faker
faker copied to clipboard
Search on next.fakerjs.dev finds non-existent pages
Pre-Checks
- [X] Follow our Code of Conduct.
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Faker issue and not related to a combination with another package.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
- [X] I am willing to provide a PR.
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
Minimal reproduction code
No response
Additional Context
No response
Environment Info
na
Which module system do you use?
- [X] CJS
- [ ] ESM
Used Package Manager
npm
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.
algolia: {
apiKey: process.env.API_KEY,
appId: process.env.APP_ID,
indexName: 'fakerjs',
},
maybe its possible to specify a different indexName for each environment?
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.
I'm closing this issue is no longer relevant as it has been fixed in #2513.
- #2513