website: add content-check command (#16064)
This commit is contained in:
parent
68894bdc62
commit
45cf63d88f
|
@ -86,6 +86,16 @@ The significant keys in the YAML frontmatter are:
|
|||
|
||||
> ⚠️ If there is a need for a `/api/*` url on this website, the url will be changed to `/api-docs/*`, as the `api` folder is reserved by next.js.
|
||||
|
||||
### Validating Content
|
||||
|
||||
Content changes are automatically validated against a set of rules as part of the pull request process. If you want to run these checks locally to validate your content before comitting your changes, you can run the following command:
|
||||
|
||||
```
|
||||
npm run content-check
|
||||
```
|
||||
|
||||
If the validation fails, actionable error messages will be displayed to help you address detected issues.
|
||||
|
||||
### Creating New Pages
|
||||
|
||||
There is currently a small bug with new page creation - if you create a new page and link it up via subnav data while the server is running, it will report an error saying the page was not found. This can be resolved by restarting the server.
|
||||
|
@ -106,7 +116,7 @@ There are several custom markdown plugins that are available by default that enh
|
|||
- `this` is a list item that begins with inline code
|
||||
```
|
||||
|
||||
Its worth noting that _only the inline code at the beginning of the list item_ will cause problems if changed. So if you changed the above markup to...
|
||||
It's worth noting that _only the inline code at the beginning of the list item_ will cause problems if changed. So if you changed the above markup to...
|
||||
|
||||
```markdown
|
||||
- lsdhfhksdjf
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,8 +8,9 @@
|
|||
"npm": ">=7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@hashicorp/platform-cli": "^2.5.1",
|
||||
"dart-linkcheck": "2.0.15",
|
||||
"@hashicorp/platform-cli": "^2.6.0",
|
||||
"@hashicorp/platform-content-conformance": "^0.0.7",
|
||||
"dart-linkcheck": "^2.0.15",
|
||||
"husky": "4.3.8",
|
||||
"next": "^12.3.1",
|
||||
"prettier": "2.2.1"
|
||||
|
@ -26,6 +27,7 @@
|
|||
"generate:readme": "next-hashicorp markdown-blocks README.md",
|
||||
"lint": "next-hashicorp lint",
|
||||
"start": "./scripts/website-start.sh",
|
||||
"linkcheck": "linkcheck https://www.nomadproject.io"
|
||||
"linkcheck": "linkcheck https://www.nomadproject.io",
|
||||
"content-check": "hc-content --config base-docs"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue