Skip to content

Commit

Permalink
docs: use frontmatter for man page generation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ethomson committed Feb 9, 2021
1 parent 792869f commit 57c9a31
Show file tree
Hide file tree
Showing 76 changed files with 94 additions and 376 deletions.
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-access.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-access
section: 1
description: Set access level on published packages
---

# npm-access(1)

## Set access level on published packages

### Synopsis

```bash
Expand Down
10 changes: 3 additions & 7 deletions docs/content/cli-commands/npm-adduser.md
@@ -1,13 +1,9 @@
---
section: cli-commands
---
title: npm-adduser
description: Set access level on published packages
section: 1
description: Add a registry user account
---

# npm-adduser(1)

## Add a registry user account

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-audit.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-audit
section: 1
description: Run a security audit
---

# npm-audit(1)

## Run a security audit

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-bin.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-bin
section: 1
description: Display npm bin folder
---

# npm-bin(1)

## Display npm bin folder

### Synopsis
```bash
npm bin [-g|--global]
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-bugs.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-bugs
section: 1
description: Bugs for a package in a web browser maybe
---

# npm-bugs(1)

## Bugs for a package in a web browser maybe

### Synopsis
```bash
npm bugs [<pkgname>]
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-build.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-build
section: 1
description: Build a package
---

# npm-build(1)

## Build a package

### Synopsis
```shell
npm build [<package-folder>]
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-bundle.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-bundle
section: 1
description: REMOVED
---

# npm-bundle(1)

## REMOVED

### Description

The `npm bundle` command has been removed in 1.0, for the simple reason
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-cache.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-cache
section: 1
description: Manipulates packages cache
---

# npm-cache(1)

## Manipulates packages cache

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-ci.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-ci
section: 1
description: Install a project with a clean slate
---

# npm-ci(1)

## Install a project with a clean slate

### Synopsis
```bash
npm ci
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-completion.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-completion
section: 1
description: Tab Completion for npm
---

# npm-completion(1)

## Tab Completion for npm

### Synopsis
```bash
source <(npm completion)
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-config.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-config
section: 1
description: Manage the npm configuration files
---

# npm-config(1)

## Manage the npm configuration files

### Synopsis
```bash
npm config set <key> <value> [-g|--global]
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-dedupe.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-dedupe
section: 1
description: Reduce duplication
---

# npm-dedupe(1)

## Reduce duplication

### Synopsis
```bash
npm dedupe
Expand Down
5 changes: 1 addition & 4 deletions docs/content/cli-commands/npm-deprecate.md
@@ -1,11 +1,8 @@
---
section: cli-commands
title: npm-deprecate
section: 1
description: Deprecate a version of a package
---
# npm-deprecate(1)

## Deprecate a version of a package

### Synopsis
```bash
Expand Down
9 changes: 2 additions & 7 deletions docs/content/cli-commands/npm-dist-tag.md
@@ -1,14 +1,9 @@
---
section: cli-commands
---
title: npm-dist-tag
section: 1
description: Modify package distribution tags
---

# npm-dist-tag(1)

## Modify package distribution tags


### Synopsis
```bash
npm dist-tag add <pkg>@<version> [<tag>]
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-docs.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-docs
section: 1
description: Docs for a package in a web browser maybe
---

# npm-docs(1)

## Docs for a package in a web browser maybe

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-doctor.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-doctor
section: 1
description: Check your environments
---

# npm-doctor(1)

## Check your environments

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-edit.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-edit
section: 1
description: Edit an installed package
---

# npm-edit(1)

## Edit an installed package

### Synopsis

```bash
Expand Down
8 changes: 2 additions & 6 deletions docs/content/cli-commands/npm-explore.md
@@ -1,13 +1,9 @@
---
section: cli-commands
---
title: npm-explore
section: 1
description: Browse an installed package
---

# npm-explore(1)

## Browse an installed package

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-fund.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-fund
section: 1
description: Retrieve funding information
---

# npm-fund(1)

## Retrieve funding information

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-help-search.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-help-search
section: 1
description: Search npm help documentation
---

# npm-help-search(1)

## Search npm help documentation

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-help.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-help
section: 1
description: Get help on npm
---

# npm-help(1)

## Get help on npm

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-hook.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-hook
section: 1
description: Manage registry hooks
---

# npm-hook(1)

## Manage registry hooks

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-init.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-init
section: 1
description: create a package.json file
---

# npm-init(1)

## create a package.json file

### Synopsis
```bash
npm init [--force|-f|--yes|-y|--scope]
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-install-ci-test.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-install-ci-test
section: 1
description: Install a project with a clean slate and run tests
---

# npm install-ci-test(1)

## Install a project with a clean slate and run tests

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-install-test.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-install-test
section: 1
description: Install package(s) and run tests
---

# npm install-test(1)

## Install package(s) and run tests

### Synopsis

```bash
Expand Down
6 changes: 1 addition & 5 deletions docs/content/cli-commands/npm-install.md
@@ -1,13 +1,9 @@
---
section: cli-commands
title: npm-install
section: 1
description: Install a package
---

# npm-install(1)

## Install a package

### Synopsis

```bash
Expand Down

0 comments on commit 57c9a31

Please sign in to comment.