You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently on the static site the top level nav goes to urls like this /primer-react/docs/[page], but clicking on components in the component library changes the url to /docs/[page]/[component]. This is due to a difference between how routing is working locally vs on the static site. Locally, /primer-react is not prefixed to every url (because GH pages is doing that), so in order for HMR to work, the routes need to go to /docs/page/component instead of /primer-react/docs/page/component. Fun times 🙃
The url generated by gh pages is /primer-react, but the static site actually lives at /primer-react/docs
The text was updated successfully, but these errors were encountered:
The Jekyll idea does sound crazy! Can we talk about this during planning, I was under the impression we had a solution for most of this and it seems like we are doing more custom stuff rather than working with the x0 api 🤷♀️ .
FYI some issues could be solved with this hack https://www.smashingmagazine.com/2016/08/sghpa-single-page-app-hack-github-pages/. Pages doesn't support SPA's very well. We could add a script to -cp the index.html to 404.html so that when someone visits a component url it loads the index which would kick of the js and show the component as expected.
Currently on the static site the top level nav goes to urls like this
/primer-react/docs/[page]
, but clicking on components in the component library changes the url to/docs/[page]/[component]
. This is due to a difference between how routing is working locally vs on the static site. Locally,/primer-react
is not prefixed to every url (because GH pages is doing that), so in order for HMR to work, the routes need to go to/docs/page/component
instead of/primer-react/docs/page/component
. Fun times 🙃The url generated by gh pages is
/primer-react
, but the static site actually lives at/primer-react/docs
The text was updated successfully, but these errors were encountered: