-
Notifications
You must be signed in to change notification settings - Fork 3.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
Update the documentation framework #1891
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.
We need to update the reference to cli-commands
in ./lib/help.js
so we don't break npm help
.
I sent you some other feedback internally about the other issues with routing when viewing the docs statically but generally, the docs that are bundled with the CLI should be able to be viewed/navigated, I think, without requiring a server to be spun up/down.
@darcyclarke I updated this based on how #1915 landed and included 77ad86b |
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.
Gatsby's markdown parser doesn't like code blocks spread over multiple lines.
Avoid needless and unnecessary redundancy.
These links now reflect the reality of the filesystem and their paths.
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.
This also reduces the publish file size rather considerably.
Conform to the norm.
This is a backport of #1915 to the
v6
branch.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.)
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.
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.Update the documentation itself to move the metadata into frontmatter.
Move the commands directory to
commands
(instead ofcli-commands
). Since they're in thecli
repo, it's clear that they're cli commands. 😀Fix a few broken links, and a few typos.
Aside from (5), there are no changes to the documentation content itself.