Skip to content

Commit 57c9a31

Browse files
committed
docs: use frontmatter for man page generation
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.
1 parent 792869f commit 57c9a31

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+94
-376
lines changed

docs/content/cli-commands/npm-access.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-access
3+
section: 1
44
description: Set access level on published packages
55
---
66

7-
# npm-access(1)
8-
9-
## Set access level on published packages
10-
117
### Synopsis
128

139
```bash

docs/content/cli-commands/npm-adduser.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
---
2-
section: cli-commands
1+
---
32
title: npm-adduser
4-
description: Set access level on published packages
3+
section: 1
4+
description: Add a registry user account
55
---
66

7-
# npm-adduser(1)
8-
9-
## Add a registry user account
10-
117
### Synopsis
128

139
```bash

docs/content/cli-commands/npm-audit.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-audit
3+
section: 1
44
description: Run a security audit
55
---
66

7-
# npm-audit(1)
8-
9-
## Run a security audit
10-
117
### Synopsis
128

139
```bash

docs/content/cli-commands/npm-bin.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-bin
3+
section: 1
44
description: Display npm bin folder
55
---
66

7-
# npm-bin(1)
8-
9-
## Display npm bin folder
10-
117
### Synopsis
128
```bash
139
npm bin [-g|--global]

docs/content/cli-commands/npm-bugs.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-bugs
3+
section: 1
44
description: Bugs for a package in a web browser maybe
55
---
66

7-
# npm-bugs(1)
8-
9-
## Bugs for a package in a web browser maybe
10-
117
### Synopsis
128
```bash
139
npm bugs [<pkgname>]

docs/content/cli-commands/npm-build.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-build
3+
section: 1
44
description: Build a package
55
---
66

7-
# npm-build(1)
8-
9-
## Build a package
10-
117
### Synopsis
128
```shell
139
npm build [<package-folder>]

docs/content/cli-commands/npm-bundle.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-bundle
3+
section: 1
44
description: REMOVED
55
---
66

7-
# npm-bundle(1)
8-
9-
## REMOVED
10-
117
### Description
128

139
The `npm bundle` command has been removed in 1.0, for the simple reason

docs/content/cli-commands/npm-cache.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-cache
3+
section: 1
44
description: Manipulates packages cache
55
---
66

7-
# npm-cache(1)
8-
9-
## Manipulates packages cache
10-
117
### Synopsis
128

139
```bash

docs/content/cli-commands/npm-ci.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-ci
3+
section: 1
44
description: Install a project with a clean slate
55
---
66

7-
# npm-ci(1)
8-
9-
## Install a project with a clean slate
10-
117
### Synopsis
128
```bash
139
npm ci

docs/content/cli-commands/npm-completion.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
---
2-
section: cli-commands
32
title: npm-completion
3+
section: 1
44
description: Tab Completion for npm
55
---
66

7-
# npm-completion(1)
8-
9-
## Tab Completion for npm
10-
117
### Synopsis
128
```bash
139
source <(npm completion)

0 commit comments

Comments
 (0)