-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Update link for Inner Blocks #14941
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@@ -486,7 +486,7 @@ transforms: { | |||
|
|||
* **Type:** `Array` | |||
|
|||
Blocks are able to be inserted into blocks that use [`InnerBlocks`](/packages/editor/src/components/inner-blocks/README.md) as nested content. Sometimes it is useful to restrict a block so that it is only available as a nested block. For example, you might want to allow an 'Add to Cart' block to only be available within a 'Product' block. | |||
Blocks are able to be inserted into blocks that use [`InnerBlocks`](/packages/block-editor/src/components/inner-blocks/README.md) as nested content. Sometimes it is useful to restrict a block so that it is only available as a nested block. For example, you might want to allow an 'Add to Cart' block to only be available within a 'Product' block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mmm, it looks like we have a bunch of links pointing to the wrong URLs. We should either:
-
Use full URLs for files that aren't published to the handbook (all component's READMEs, things that live within
*/src/*
, etc.): https://wordpress.org/gutenberg/handbook/designers-developers/developers/packages/packages-block-editor/#InnerBlocks -
Use relative URLs to the handbook docs:
/docs/designers-developers/developers/packages/packages-block-editor/#InnerBlocks
Yup, it's not. To my knowledge, it was never published to the handbook. Note that https://wordpress.org/gutenberg/handbook/designers-developers/developers/packages/packages-block-editor/#InnerBlocks uses the info from the JSDoc comments (in this case there is none). Here are some thoughts on how we could improve this:
What if we moved the relevant info from the component's README to JSDoc comments, then automatically fill both the component's README and the handbook page? This is one of the tasks I'm tracking on #14227 At the moment the ./bin/update-readmes only updates the packages' README, but we could adapt it to also update the inner component's READMEs. |
Ok, I'll merge this one which "fixes" the link at least to the right packages section. We can track the sub-components on your at #14227 - I need to dig in a little more to understand completely. My initial hunch is that it is probably best to try and match the handbook docs to Github directory structure as much as possible. The |
* Update link for Inner Blocks, component of block-editor package * Add back whitespace in title, fixed in different PR
Description
The Inner Blocks component is linked to the wrong spot, the old link is going to
/packages/editor/src/components/inner-block/README.md
the new location should beblock-editor
package.This PR updates the link on block-registration, and block-templtes page.
However, I don't think the actually Inner Block documentation is being published anywhere.
@nosolosw if I look in the source repo on Github, the readme file is there for Inner Blocks.
See: https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/inner-blocks
However, if I look at the Gutenberg Handbook, it looks empty here
https://wordpress.org/gutenberg/handbook/designers-developers/developers/packages/packages-block-editor/#InnerBlocks
Types of changes
Documentation