Repository navigation
fix(playground): /themes leads to the theme index - #189
Merged
Merged
Conversation
/themes answered 404 although every /themes/<name> page exists. It now redirects to the "Theme pages" index on /tokens, where the nav and the theme pages' breadcrumb already point. Prerendered as themes/index.html with a meta refresh, it works on GitHub Pages without a server or JavaScript, and the Pages smoke test checks it. Closes #188
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
/themessends the visitor to the theme index instead of answering 404 (#188). Closes #188.apps/playground/src/routes/themes/+page.tsredirects to the "Theme pages" section on/tokens(#index-title), the index that the nav and the theme pages' breadcrumb already point at. I did not add a second index page.trailingSlash = 'always', so it is built asthemes/index.htmlwith a meta refresh and a script, both using the relative URL../tokens#index-title. This needs no server and no JavaScript. GitHub Pages answers/themeswith/themes/, so the relative URL resolves correctly. Without the trailing slash, the redirect would be built asthemes.htmlbeside thethemes/folder, and a folder redirect would make its URL miss the target.pages.yml) now also checks that/themesleads to the index.Why
Every
/themes/<name>page exists, but the folder URL was a dead end on GitHub Pages and locally. That happens when a visitor trims the URL or follows a link to the folder.Testing
bun run check,test,lintanddetectpass. This is the playground only, so there is no changeset..html, thenindex.html), checked in Chromium:/codecora-ui/themesends on/codecora-ui/tokens#index-titlewith the "Theme pages" heading;/codecora-ui/themes/;/themes/corin.pages.ymlsmoke steps, run locally withvite preview:/themesanswers 308 to/themes/, then reaches the meta refresh;major): deterministic checks found nothing; the agent judge returnedshould_block: false, 0 issues.