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
@mtias tried to create an up to date documentation of all available reusable components in #2762. We decided to close this PR because there are so many components to process and this would require to manually keep in sync README files created for all exposed components and the document we want.
It'd be nice to generate new document, which will be part of Gutenberg's handbook, from each component's readme. It is possible to reuse some of the copy from #2762 and just start PRs for each component and then combine them together into one page with the script.
I'm thinking we could use something like Husky combined with Lint-Staged so that when a component markdown file is edited it could copy the appropriate file over to a components directory in the docs directory. Then we'd just need a top-level components page.
Activity
wpscholar commentedon Jul 26, 2018
I'm thinking we could use something like Husky combined with Lint-Staged so that when a component markdown file is edited it could copy the appropriate file over to a
componentsdirectory in thedocsdirectory. Then we'd just need a top-level components page.gziolo commentedon Jul 26, 2018
We don't need to move it anywhere, we already expose
README.mdfromcomponentsfolder: https://wordpress.org/gutenberg/handbook/packages/packages-components/. We just need to create a script which properly indexes all components and includes them in this file: https://github.com/WordPress/gutenberg/blob/master/docs/manifest.json.At the moment we regenerate this
manifestfile manually withnpm run docs:buildso Husky and Lint-Staged would be a really nice improvement 💯wpscholar commentedon Jul 26, 2018
@gziolo So just to clarify, we want to create a script that will take any component in this location https://github.com/WordPress/gutenberg/tree/master/editor/components that has a readme file and add that to the docs? Your link points to the packages, which appear to already be dynamically indexed.
gziolo commentedon Jul 30, 2018
@wpscholar, correct. This is what @youknowriad did in the past for
storefolders #7264. This should be a quite similar effort.By the way, @mmtr is working to add usage examples for all components with #8267 so we should have good materials to expose in the Gutenberg handbook.