-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Bootstrap a documentation website tailored towards the usage of Gutenberg outside WordPress #54375
Conversation
Size Change: +1.51 kB (0%) Total Size: 1.52 MB
ℹ️ View Unchanged
|
Flaky tests detected in 8f6a200. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6157101539
|
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.
This is great work @youknowriad 🙌
I've done a quick typo pass and added a few suggestions for fixes.
Also, I was curious - is there a good reason to keep this within the Gutenberg repo? Given that this has no dependencies from within the rest of the repo, is there a good reason to keep it within the repo? Won't it be more straightforward to just maintain it within a separate repo? Or are we aiming to include dependencies from inside the packages at some point? Or perhaps we want folks to update the docs as part of the changes in their Gutenberg PRs? Perhaps you're aiming for that to happen automatically at some point? I'd love to know what your thoughts about that are.
align-items: center; | ||
padding: 2rem 0; | ||
width: 100%; | ||
background: var(--ifm-color-secondary); |
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.
Would be nice to lint this code at some point.
Yes, for me, this is the main selling point, I like when documentation is in the same place as the code because when you're making changes, adding features, it becomes kind of an automatic habit to update the docs at the same time. At least there's a way smaller chance that the documentation goes out of sync. |
Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
Makes sense to me 👍 in that case we could put some pre-commit automation in place so folks will recall to update the relevant docs. Could be part of the |
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.
I'll also leave some comments about typos and lint 👀
const value = [ block1, block2, block3 ]; | ||
``` | ||
|
||
### The block object |
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.
Should all headings be in title case?
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.
This is awesome, and clearly written. Thank you!
I left some very pedantic style/grammar changes just to enhance readability.
Thanks Riad! So if I get it right, some documentation here is new and some of it from existing docs, but focused on GB as a framework. So, is the plan to move all the GB parts of docs in this new site and remove them(with some link here) from the current docs? It's just the keeping them in sync issue that concerns me a bit. Are some existing moved docs(ex about the data flow) reworded here, or kept as are? Because I saw a few copy suggestions that we should probably apply to the current docs. |
Most of the documentation here is new. I did copy/paste some documentation about the block format and adapted it a bit. The plan itself is yet to be determined, consider this PR as a proposal but IMO, we should keep two documentation websites, the current handbook for WordPress developers and this new website for all developers. There will most likely be some duplication. |
Co-authored-by: Ramon <ramonjd@users.noreply.github.com> Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
It is time to come up with a plan for this. I'd like to propose the following:
I obviously can't work on this on my own, so I'll also need help writing all these docs and trying them. So would be great to have some volunteers to help with this. |
sidebar_position: 2 | ||
--- | ||
|
||
# Interactivity API |
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.
@WordPress/frontend-dx you might wanna contribute some basic docs here 🙂
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.
This sounds like a good plan Riad. Let's ship and iterate.
Ok let's land this and iterate. Please do help with documentation and all. |
Related #53874
What and why?
Gutenberg can be used as a platform/framework to build block editors. Mainly thanks to the @wordpress/block-editor package. That said, the experience today is not as straightforward as it can be. There can be a lot of small gotchas and hacks you need to do in order to achieve the desired result. Also more importantly, our documentation is essentially written for WordPress developers. So it's very hard for third-party developers building their own applications and/or editors to know what should and shouldn't be used in that context.
This PR bootstrap a new documentation website specially tailored towards that use-case. The final goal is to achieve something close to these alternatives: 1, 2, 3.
How
platform-docs
top level folder.gutenberg-as-a-platform.mov
Testing Instructions
You can test locally by following the instructions above.