griffel
griffel copied to clipboard
docs: use autogenerated pages for try out
Currently our https://griffel.js.org/try-it-out/ is powered by hash based based on snippets collected in Playground component:
https://github.com/microsoft/griffel/blob/62cf39c860782a69ea9c89d797cdda094a3605a6/apps/website/src/components/Playground/index.tsx#L9
Ideally we should have:
- a real page for every example i.e.
/try-it-out/margin- remove
require.resolve()inPlayground
- remove
- pass
sourceas a stringPlaygroundcomponent<Playground source={props.source} /> - it be part of
docusaurus starti.e. no other commands are required to update these pages
Ideally, we are looking for something like getStaticPaths() in Next.js, but in docusaurus 🙃