Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search on next.fakerjs.dev finds non-existent pages #1587

Closed
9 of 10 tasks
matthewmayer opened this issue Nov 22, 2022 · 4 comments
Closed
9 of 10 tasks

Search on next.fakerjs.dev finds non-existent pages #1587

matthewmayer opened this issue Nov 22, 2022 · 4 comments
Labels
c: bug Something isn't working c: docs Improvements or additions to documentation p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Milestone

Comments

@matthewmayer
Copy link
Contributor

Pre-Checks

Describe the bug

Go to https://next.fakerjs.dev/
Search "unique"
Click top result
It takes you to https://next.fakerjs.dev/api/unique.html#unique which is a 404

Screenshot 2022-11-22 at 10 56 52

Screenshot 2022-11-22 at 10 56 58

Minimal reproduction code

No response

Additional Context

No response

Environment Info

na

Which module system do you use?

  • CJS
  • ESM

Used Package Manager

npm

@matthewmayer matthewmayer added c: bug Something isn't working s: pending triage Pending Triage labels Nov 22, 2022
@Shinigami92
Copy link
Member

I highly assume that is because Algolia Index is based on fakerjs.dev not next.fakerjs.dev and so you see the results for the prod site.

@matthewmayer
Copy link
Contributor Author

algolia: {
      apiKey: process.env.API_KEY,
      appId: process.env.APP_ID,
      indexName: 'fakerjs',
    },

maybe its possible to specify a different indexName for each environment?

@ST-DDT ST-DDT added c: docs Improvements or additions to documentation p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug and removed s: pending triage Pending Triage labels Nov 22, 2022
@ST-DDT
Copy link
Member

ST-DDT commented Nov 22, 2022

Well, the next branch is build the most recent, but the index still only takes the main page into consideration, so I wonder if we have to configure something more than just the index name. I assume we have to configure that directly in algolia.


I think we could use this for the index name:

export const indexName = deployContext === 'production' || deployContext === 'branch-deploy' ? branchName : 'other';

(other for deploy previews, if we want the search there at all)

To be added to docs/.vitepress/versions.ts.

This needs to be backported to all other versions/branches.

@xDivisionByZerox
Copy link
Member

I'm closing this issue is no longer relevant as it has been fixed in #2513.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working c: docs Improvements or additions to documentation p: 1-normal Nothing urgent s: accepted Accepted feature / Confirmed bug
Projects
No open projects
Status: Todo
Development

No branches or pull requests

4 participants