hzdg / hz-core

HZ's internal library of React Components 🚧
https://hz-core.netlify.com
0 stars 0 forks source link

Fix hz-core docz routing on Netlify #20

Closed lettertwo closed 5 years ago

lettertwo commented 5 years ago

Seems our generated docz site is all client-side routing, which in retrospect, i guess should have been obvious.

For example: going to https://hz-core.netlify.com and clicking on PageGesture takes you to https://hz-core.netlify.com/page-gesture, which works while routing in the client, but 404s on refresh or direct link.

I think we have two options here:

  1. configure Netlify to route everything to the docz index
  2. build a static site using Gatsby + gatsby-theme-docz

Since Netlify is tuned for static sites, I think the second option might be better, but the first option might be faster.

aamorozov commented 5 years ago

Fixed in https://github.com/hzdg/hz-core/pull/21. And verified on production