Skip to content

Commit

Permalink
Restore missing handbook pages after #12411 (#12452)
Browse files Browse the repository at this point in the history
## Description
Following on from #12411 and #11817 it was noticed that some pages were skipped, as they weren't included in the `toc.json` file previously.

This PR includes several specific fixes which are all interconnected:
1. Adds the Internationalization page along with the Block Tutorial to the handbook hierarchy
1. An additional landing page for the Tutorials index was added
1. `Components` was added to the developers handbook alongside `Packages` and `Data Package Reference` pages.
1. In order to handle the above move, the duplicative declarations of `Packages`, `Data Package Reference` and `Components` were removed from `docs/tool/manifest.js` to prevent them adding as top-level-items. (Are these intended to be top-level-handbook-pages or deep within the developers handbook as the TOC seems to suggest?)

I also took the opportunity to convert `generate.php` from the previous PR into a JS command that allows for `docs/root-manifest.json` to be removed entirely and dynamically generated from `docs/toc.json` so it only needs updating in a single location.  That's the `getRootManifest()` and `generateRootManifestFromTOCItems()` functions which are rather messy, but work (I'm sure someone else could clean that up significantly).

## How has this been tested?
The only testing done so far is the manual review of the final `docs/manifest.json`.
  • Loading branch information
dd32 authored and ntwb committed Dec 4, 2018
1 parent 652a662 commit 69b55c7
Show file tree
Hide file tree
Showing 10 changed files with 149 additions and 359 deletions.
2 changes: 1 addition & 1 deletion docs/designers-developers/developers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gutenberg is highly flexible, like most of WordPress. You can build custom block

Gutenberg is about blocks, and the main extensibility API of Gutenberg is the Block API. It allows you to create your own static blocks, dynamic blocks rendered on the server and also blocks capable of saving data to Post Meta for more structured content.

If you want to learn more about block creation, the [Blocks Tutorial](../../../docs/designers-developers/developers/tutorials/block-tutorial/intro.md) is the best place to start.
If you want to learn more about block creation, the [Blocks Tutorial](../../../docs/designers-developers/developers/tutorials/block-tutorial/readme.md) is the best place to start.

## Extending Blocks

Expand Down
3 changes: 3 additions & 0 deletions docs/designers-developers/developers/tutorials/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Tutorials

If you want to learn more about block creation, the [Blocks Tutorial](../../../../docs/designers-developers/developers/tutorials/block-tutorial/readme.md) is the best place to start.
2 changes: 1 addition & 1 deletion docs/designers-developers/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ Our [list of supported browsers can be found in the Make WordPress handbook](htt

## How do I make my own block?

The API for creating blocks is a crucial aspect of the project. We are working on improved documentation and tutorials. Check out the [Creating Block Types](../../docs/designers-developers/developers/tutorials/block-tutorial/intro.md) section to get started.
The API for creating blocks is a crucial aspect of the project. We are working on improved documentation and tutorials. Check out the [Creating Block Types](../../docs/designers-developers/developers/tutorials/block-tutorial/readme.md) section to get started.

## Does Gutenberg involve editing posts/pages in the front-end?

Expand Down
78 changes: 60 additions & 18 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/filters/autocomplete-filters.md",
"parent": "filters"
},
{
"title": "Internationalization",
"slug": "internationalization",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/internationalization.md",
"parent": "developers"
},
{
"title": "Data Module Reference",
"slug": "data",
Expand All @@ -107,6 +113,12 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/packages.md",
"parent": "developers"
},
{
"title": "Components",
"slug": "components",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/components/README.md",
"parent": "developers"
},
{
"title": "Theming for Gutenberg",
"slug": "themes",
Expand Down Expand Up @@ -137,6 +149,54 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/backwards-compatibility/meta-box.md",
"parent": "backwards-compatibility"
},
{
"title": "Tutorials",
"slug": "tutorials",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/readme.md",
"parent": "developers"
},
{
"title": "Blocks",
"slug": "block-tutorial",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/block-tutorial/readme.md",
"parent": "tutorials"
},
{
"title": "Writing Your First Block Type",
"slug": "writing-your-first-block-type",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/block-tutorial/writing-your-first-block-type.md",
"parent": "block-tutorial"
},
{
"title": "Applying Styles From a Stylesheet",
"slug": "applying-styles-with-stylesheets",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/block-tutorial/applying-styles-with-stylesheets.md",
"parent": "block-tutorial"
},
{
"title": "Introducing Attributes and Editable Fields",
"slug": "introducing-attributes-and-editable-fields",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/block-tutorial/introducing-attributes-and-editable-fields.md",
"parent": "block-tutorial"
},
{
"title": "Block Controls: Toolbars and Inspector",
"slug": "block-controls-toolbars-and-inspector",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/block-tutorial/block-controls-toolbars-and-inspector.md",
"parent": "block-tutorial"
},
{
"title": "Creating dynamic blocks",
"slug": "creating-dynamic-blocks",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md",
"parent": "block-tutorial"
},
{
"title": "Generate Blocks with WP-CLI",
"slug": "generate-blocks-with-wp-cli",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/tutorials/block-tutorial/generate-blocks-with-wp-cli.md",
"parent": "block-tutorial"
},
{
"title": "Designer Documentation",
"slug": "designers",
Expand Down Expand Up @@ -281,12 +341,6 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/contributors/testing-overview.md",
"parent": "contributors"
},
{
"title": "Packages",
"slug": "packages",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/packages.md",
"parent": null
},
{
"title": "@wordpress/a11y",
"slug": "packages-a11y",
Expand Down Expand Up @@ -587,12 +641,6 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/wordcount/README.md",
"parent": "packages"
},
{
"title": "Components Package Reference",
"slug": "components",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/components.md",
"parent": null
},
{
"title": "Autocomplete",
"slug": "autocomplete",
Expand Down Expand Up @@ -971,12 +1019,6 @@
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/packages/components/src/tree-select/README.md",
"parent": "components"
},
{
"title": "Data Package Reference",
"slug": "data",
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/designers-developers/developers/data/README.md",
"parent": null
},
{
"title": "WordPress Core Data",
"slug": "data-core",
Expand Down
Loading

0 comments on commit 69b55c7

Please sign in to comment.