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: Generate block.json metadata documentation from schema file #36279

Open
mkaz opened this issue Nov 6, 2021 · 3 comments
Open
Labels
[Type] Developer Documentation Documentation for developers

Comments

@mkaz
Copy link
Member

mkaz commented Nov 6, 2021

What problem does this address?

With the block.json file now a part of the Gutenberg repository (#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
Copy link
Member

gziolo commented Nov 8, 2021

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:

  • code example
  • since when added to WordPress core
  • mark localized fields

Screen Shot 2021-11-08 at 14 48 36

@mkaz
Copy link
Member Author

mkaz commented Dec 11, 2021

Related: #24422

@ryanwelcher
Copy link
Contributor

Is this still relevant based #36183 being merged?

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

3 participants