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

Reorganise documentation #11817

Merged
merged 22 commits into from
Nov 20, 2018
Merged

Reorganise documentation #11817

merged 22 commits into from
Nov 20, 2018

Conversation

chrisvanpatten
Copy link
Member

@chrisvanpatten chrisvanpatten commented Nov 13, 2018

This is the long-awaited reorganisation of documentation into three handbooks:

This is NOT READY FOR MERGE OR REVIEW. I hope this is ready to go… or close :)

Thank you ❤️

@chrisvanpatten chrisvanpatten added [Type] Developer Documentation Documentation for developers [Status] In Progress Tracking issues with work in progress labels Nov 13, 2018
@chrisvanpatten chrisvanpatten self-assigned this Nov 13, 2018
@chrisvanpatten
Copy link
Member Author

So far this PR only moves files; I will be reorganising within files next, and hope to have this merge-ready ASAP as it's a big change that will impact a lot of things.

@chrisvanpatten
Copy link
Member Author

chrisvanpatten commented Nov 14, 2018

Todo:

  • Update manifest.json
  • Update root-manifest.json
  • Update all internal links

@chrisvanpatten
Copy link
Member Author

I’m going to write a small manifest generator tomorrow (probably based on the one WP-CLI uses) so we can get those references updated, then do a final pass at internal links. I think we will have a first version ready for tomorrow afternoon, and I’ll file iterative PRs from there.

Really keen to get this first pass done and merged quickly to avoid any messy rebases/merges since it’s a fairly wide reaching PR 😅

@0aveRyan
Copy link
Contributor

working on updating structure for developer docs per discussion on #11251

@chrisvanpatten
Copy link
Member Author

Cross-posting from Slack:

Quick sanity check: I wrote up a quick root-manifest.json generator but I believe it won't actually be viable as part of a build process without some kind of table of contents file (in JSON or YAML or something) describing the order of the manifest, as it seems like the order needs to be intentional. Is that about right?

Not a waste of time because it's still going to dramatically simplify my work on the PR (I'll rearrange the JSON manually, but won't have to write it manually) but I just want to make sure that's a safe assumption.

@chrisvanpatten
Copy link
Member Author

Hey @0aveRyan anything I can do to help you? Do you want me to take back over?

@chrisvanpatten
Copy link
Member Author

Okay this is painfully close to being ready! Just need to get the manifest updated and we're good to go.

@chrisvanpatten chrisvanpatten requested review from mtias and a team November 20, 2018 00:52
@chrisvanpatten chrisvanpatten changed the title [WIP] [DO NOT MERGE] Reorganise documentation Reorganise documentation Nov 20, 2018
@chrisvanpatten
Copy link
Member Author

chrisvanpatten commented Nov 20, 2018

Okay I would love many sanity checks on this but I believe this is in a good place now.

As part of the re-org, I added a new file, toc.json, which acts as an easier table of contents structure. This makes it possible to auto-generate a root-manifest.json (which is very tedious to write manually, especially when the changeset is as large as this).

Note: I included a docs/generate.php file which generates the manifest from toc.json. I don't think this should get merged into Gutenberg without being rewritten as a wp-cli function or as a node script. (I'd love to do myself, that but I've got a backlog of client work waiting for commits and know we're pushing the timeline limits for 5.0 docs too. Anyone want to hire me so I can work on this full time? 😉) I'll remove the file from the repo before merge, so it will disappear in the squash merge.

(This will be followed up by new documentation—especially user documentation—that I've been working on.)

@chrisvanpatten chrisvanpatten added [Type] Enhancement A suggestion for improvement. [Type] Refactoring and removed [Status] In Progress Tracking issues with work in progress labels Nov 20, 2018
@@ -0,0 +1,131 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a script to generate docs in docs/tool I think we should consolidate. Having two tools to generate the same documentation is weird.

Also about the new toc.json file. I'm fine with the new file but this makes the root-manifest.json file useless as it's generated and then used to generate manifest.json. We should just generate manifest.json directly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree - I plan to remove my PHP script before this is merged. I am time constrained right now so I decided to write it in a language that I was a little more familiar to me so I could get it done faster :)

@mcsf
Copy link
Contributor

mcsf commented Nov 20, 2018

Managing relative links in this base is definitely one of the biggest challenges for docs. I can't confidently review them all, but as you've noticed there's quite a few that may be broken.

That said, if you're overall confident that we can iterate on that, I can 👍 this PR!

@chrisvanpatten
Copy link
Member Author

@mcsf I would love to figure out some kind of system that would remove the need to use relative links. If anyone out there has any clever ideas I'm all ears!

@youknowriad youknowriad merged commit c77cf74 into master Nov 20, 2018
@youknowriad youknowriad deleted the big/reorganise-docs branch November 20, 2018 21:05
@chrisvanpatten
Copy link
Member Author

🎉

@ellatrix ellatrix added [Type] Code Quality Issues or PRs that relate to code quality and removed [Type] Code Quality Issues or PRs that relate to code quality labels Nov 27, 2018
ntwb pushed a commit that referenced this pull request Dec 4, 2018
## 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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants