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

docs: use autogenerated pages for try out #219

Open
layershifter opened this issue Sep 26, 2022 · 0 comments
Open

docs: use autogenerated pages for try out #219

layershifter opened this issue Sep 26, 2022 · 0 comments
Labels
📃 documentation Improvements or additions to documentation 🛟 help wanted Extra attention is needed

Comments

@layershifter
Copy link
Member

Currently our https://griffel.js.org/try-it-out/ is powered by hash based based on snippets collected in Playground component:

const ctx = require.context('./code/templates', false, /\.js$/);

Ideally we should have:

  • a real page for every example i.e. /try-it-out/margin
    • remove require.resolve() in Playground
  • pass source as a string Playground component
    <Playground source={props.source} />
  • it be part of docusaurus start i.e. no other commands are required to update these pages

Ideally, we are looking for something like getStaticPaths() in Next.js, but in docusaurus 🙃

@layershifter layershifter added 📃 documentation Improvements or additions to documentation 🛟 help wanted Extra attention is needed labels Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📃 documentation Improvements or additions to documentation 🛟 help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant