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

Documentation: Add "components" doc #4952

Closed
gziolo opened this issue Feb 8, 2018 · 4 comments
Closed

Documentation: Add "components" doc #4952

gziolo opened this issue Feb 8, 2018 · 4 comments
Assignees
Labels
[Type] Developer Documentation Documentation for developers

Comments

@gziolo
Copy link
Member

gziolo commented Feb 8, 2018

Issue Overview

@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.

@gziolo gziolo added the [Type] Developer Documentation Documentation for developers label Feb 8, 2018
@gziolo gziolo added this to the Merge Proposal: Documentation milestone Jul 12, 2018
@wpscholar
Copy link
Member

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.

@gziolo
Copy link
Member Author

gziolo commented Jul 26, 2018

We don't need to move it anywhere, we already expose README.md from components folder: 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 manifest file manually with npm run docs:build so Husky and Lint-Staged would be a really nice improvement 💯

@wpscholar
Copy link
Member

@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
Copy link
Member Author

gziolo commented Jul 30, 2018

@wpscholar, correct. This is what @youknowriad did in the past for store folders #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.

@wpscholar wpscholar self-assigned this Jul 31, 2018
@wpscholar wpscholar mentioned this issue Jul 31, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

No branches or pull requests

2 participants