WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.5k stars 4.2k forks source link

Documentation: Generate block.json metadata documentation from schema file #36279

Open mkaz opened 3 years ago

mkaz commented 3 years ago

What problem does this address?

With the block.json file now a part of the Gutenberg repository (https://github.com/WordPress/gutenberg/pull/35998) we can take advantage of this file and use it to auto-generate block.json reference documentation.

What is your proposed solution?

The current block metadata documentation page could be updated to replace the "Block API" section with details generated out of the block.json schema file

The explanations and examples in the header and footer can be maintained and just the inner content replaced by using TOKENs to delimit the section that is auto-generated. See the other API generation docs for examples where we already do this.

gziolo commented 3 years ago

The current block metadata documentation page could be updated to replace the "Block API" section with details generated out of the block.json schema file

That would be great. We would have to include more details in the block.json schema file like:

Screen Shot 2021-11-08 at 14 48 36
mkaz commented 2 years ago

Related: #24422

ryanwelcher commented 1 year ago

Is this still relevant based https://github.com/WordPress/gutenberg/pull/36183 being merged?