-
Notifications
You must be signed in to change notification settings - Fork 534
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
Example permalinks don't work #59
Comments
Some notes here after trying out Next.js in #64 and then switching back to using x0 in #65 with examples broken out into individual files:
|
Update: I got routing working as we'd like, but even when examples route to |
Did you try this? #84 (comment) |
Hey hey, this works! E.g. https://primer.github.io/primer-react/components/Details 🎉 |
Our x0-driven docs site doesn't generate working component permalinks. When we publish to Pages, the index loads from
/primer-react/
, but the links all go to/{ComponentName}
(without the right path prefix). The pages for individual components don't even really exist (there's only anindex.html
in thedocs
directory), so I'm not sure what the URLs really should be for a component example. Having working permalinks seems pretty crucial to me.To reproduce, visit
https://primer.github.io/primer-react/
and click on "Details". The URL changes tohttps://primer.github.io/Details
, which doesn't exist. But neither do any of the following:https://primer.github.io/primer-react/Details
https://primer.github.io/primer-react/?Details
https://primer.github.io/primer-react/#Details
We've already set
x0.basename
inpackage.json
as described in x0's docs, but the URLs that are getting passed tolocation.replace()
orhistory.pushState()
just aren't right.Any ideas, @broccolini?
The text was updated successfully, but these errors were encountered: