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

Update the documentation framework for v7 #1915

Closed
wants to merge 11 commits into from
Closed

Conversation

ethomson
Copy link
Contributor

@ethomson ethomson commented Oct 7, 2020

Note: this is the docs framework targeted against the v7 release.

Some updates to the documentation framework (the scripts that build and display docs) to both make them a little shinier and easier to work with, and to help align these docs with the npm registry documentation. (The npm registry documentation includes these docs as a subset, so there are some changes to make them more easily consumable.)

  1. Drop Gatsby. For our needs, it's big and slow, and it produces complex content. Introduce a new application "dockhand" that takes our markdown content, converts that to HTML, puts that in a simple template, and does some minor translations. The output is standalone HTML files with zero external dependencies.

  2. An update to the docs-build.js manpage generation script to parse data out of the frontmatter of the documentation pages, instead of parsing the documentation content. Moving this to metadata makes the content focused on the display, and the frontmatter is focused on the metadata.

  3. Update the documentation itself to move the metadata into frontmatter.

  4. Move the commands directory to commands (instead of cli-commands). Since they're in the cli repo, it's clear that they're cli commands. 😀

  5. Fix a few broken links, and a few typos.

Aside from (5), there are no changes to the documentation content itself.

@ethomson ethomson requested a review from a team as a code owner October 7, 2020 09:14
@ethomson ethomson added the Release 7.x work is associated with a specific npm 7 release label Oct 7, 2020
@ethomson ethomson force-pushed the docs-7 branch 3 times, most recently from 4f6fb7a to b67ff02 Compare October 15, 2020 20:40
@ethomson ethomson changed the base branch from release/v7.0.0 to latest October 15, 2020 20:40
@darcyclarke darcyclarke added the release: next These items should be addressed in the next release label Oct 15, 2020
@ethomson ethomson force-pushed the docs-7 branch 5 times, most recently from 304c041 to 3358a18 Compare October 16, 2020 12:30
@darcyclarke darcyclarke removed the release: next These items should be addressed in the next release label Oct 16, 2020
Update the `docs-build.js` script to parse the name, man page section,
and description out of the frontmatter and use that for the generated
man page.  This helps avoid repetition between the frontmatter section
and the body of the page itself.

Update the docs pages themselves to remove the H1 (title) and H2
(description).  Finally, ensure that the frontmatter begins in column
0 on each page.
Many markdown parsers choke on code blocks spread over multiple lines.
Avoid needless and unnecessary redundancy.
These links now reflect the reality of the filesystem and their paths.
Again, this reflects the path hierarchy and structure, and matches the
old documentation URLs.
Update links to reflect where the pages actually are.
Drop Gatsby, use a simplified custom static site generator that uses GFM
and a template for extremely lightweight docs.
@darcyclarke darcyclarke added the release: next These items should be addressed in the next release label Oct 23, 2020
Copy link
Contributor

@darcyclarke darcyclarke left a comment

Choose a reason for hiding this comment

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

✅ LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: next These items should be addressed in the next release Release 7.x work is associated with a specific npm 7 release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants