-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation style guide and tool configs (#5320)
* Add eslint, markdownlint, and prettier configs * Update node engine version * Fix generated CLI docs path * Add style guide and update README * Bump tools and add Dependabot group for eslint * Add license header
- Loading branch information
Showing
13 changed files
with
3,569 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"gitignore": true, | ||
"globs": ["**/*.md"], | ||
"ignores": [ | ||
"node_modules/", | ||
".docusaurus", | ||
"build/", | ||
"docs/ref/cli/", | ||
"docs/ref/proto.md", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"code-block-style": { | ||
"style": "fenced" | ||
}, | ||
"code-fence-style": { | ||
"style": "backtick" | ||
}, | ||
"emphasis-style": { | ||
"style": "underscore" | ||
}, | ||
"heading-style": { | ||
"style": "atx" | ||
}, | ||
"hr-style": { | ||
"style": "---" | ||
}, | ||
"line-length": { | ||
"code_blocks": false, | ||
"line_length": 80, | ||
"tables": false | ||
}, | ||
"no-bare-urls": false, | ||
"no-duplicate-heading": false, | ||
"proper-names": { | ||
"code_blocks": false, | ||
"names": ["GitHub", "GitLab", "Bitbucket"] | ||
}, | ||
"strong-style": { | ||
"style": "asterisk" | ||
}, | ||
"table-pipe-style": { | ||
"style": "leading_and_trailing" | ||
}, | ||
"ul-style": { | ||
"style": "dash" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules/ | ||
.docusaurus/ | ||
build/ | ||
|
||
# Auto-generated files | ||
docs/ref/cli/*.md | ||
docs/ref/proto.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"jsxSingleQuote": true, | ||
"printWidth": 80, | ||
"proseWrap": "always", | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "es5", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,66 @@ | ||
# Docs for Minder | ||
# Minder documentation | ||
|
||
This directory contains the user documentation for Minder, hosted at | ||
<https://mindersec.github.io>. | ||
|
||
The docs are built with [Docusaurus](<[https://](https://docusaurus.io/)>), an | ||
open source static website generator optimized for documentation use cases. | ||
|
||
## Contributing to docs | ||
|
||
We welcome community contributions to the Minder documentation - if you find | ||
something missing, wrong, or unclear, please let us know via an issue or open a | ||
PR! | ||
|
||
Please review the [style guide](./STYLE-GUIDE.md) for help with voice, tone, and | ||
formatting. | ||
|
||
## Building the docs locally | ||
|
||
Start from the top level directory of the repository. | ||
Start from the top level directory of the `minder` repository and generate the | ||
CLI docs: | ||
|
||
Generate the CLI docs | ||
``` | ||
```bash | ||
make cli-docs | ||
``` | ||
|
||
Build the docs | ||
``` | ||
cd docs | ||
``` | ||
Run a preview server: | ||
|
||
```bash | ||
npm run start | ||
``` | ||
|
||
Your browser should automatically open to <http://localhost:3000> | ||
|
||
Build the docs: | ||
|
||
```bash | ||
cd docs | ||
npm run build | ||
``` | ||
|
||
Serve the docs | ||
``` | ||
|
||
```bash | ||
npm run serve -- --port 3001 | ||
``` | ||
|
||
Visit http://localhost:3001/ to view the docs. | ||
|
||
## Formatting | ||
|
||
Before you submit a PR, please check for formatting and linting issues: | ||
|
||
```bash | ||
npm run prettier | ||
npm run markdownlint | ||
npm run eslint | ||
``` | ||
|
||
To automatically fix issues: | ||
|
||
```bash | ||
npm run prettier:fix | ||
npm run markdownlint:fix | ||
npm run eslint:fix | ||
``` |
Oops, something went wrong.