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

Remaining Docs fixes #84

Closed
emplums opened this issue Jun 21, 2018 · 2 comments
Closed

Remaining Docs fixes #84

emplums opened this issue Jun 21, 2018 · 2 comments

Comments

@emplums
Copy link

emplums commented Jun 21, 2018

  • 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

@emplums emplums mentioned this issue Jun 22, 2018
8 tasks
@shawnbot
Copy link
Contributor

Okay, I know this is kinda crazy, but could we generate a Jekyll site for Pages to build and put {{ site.url }} as our basename when we build?

@broccolini
Copy link
Member

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.

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

3 participants