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

refactor doc links to trailing slashes? #841

Closed
felixroos opened this issue Dec 5, 2023 · 2 comments
Closed

refactor doc links to trailing slashes? #841

felixroos opened this issue Dec 5, 2023 · 2 comments

Comments

@felixroos
Copy link
Collaborator

felixroos commented Dec 5, 2023

currently, all the doc links point to urls without trailing slash. the reason is this now closed issue: #569 with that fixed, urls with trailing slash now work.

the algolia search results actually point to the versions with trailing slash.
when clicking on a result, the sidebar anchor links will reload the whole page because they point to the slashless version (and sometimes they might not work, not sure when exactly).

also, the algolia crawler seems to first hit the slashless urls and then the redirect, which is why the crawler ignores many urls, polluting the output.

the slashless urls only work because, for directories, github pages redirects from URLs without trailing slash to the same URL with trailing slash as mentioned here: vite-pwa/astro#23 (comment) (although the service worker intercepts these redirects and serves the cached response somehow) + astro builds each page into its own directory by default (https://docs.astro.build/de/reference/configuration-reference/#buildformat defaults to 'directory')

TLDR; just refactor the links to trailing slashes to get a cleaner algolia crawl + less flashing when clicking around the docs

@felixroos felixroos mentioned this issue Dec 5, 2023
@felixroos
Copy link
Collaborator Author

I'll look into it

@felixroos
Copy link
Collaborator Author

fixed in #842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant