Skip to content

Commit 2dbdb16

Browse files
Improve README from onboarding notes (#4247)
Co-authored-by: Jessamy Taylor <75634662+JessamyT@users.noreply.github.com>
1 parent ffc1f1c commit 2dbdb16

File tree

1 file changed

+38
-17
lines changed

1 file changed

+38
-17
lines changed

README.md

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
# Welcome to the Viam Documentation
66

7-
> **Note**
7+
> [!NOTE]
88
> Looking to contribute? Check out the [Contributor Guide](https://docs.viam.com/appendix/contributing/).
9-
> For help knowing what and how to write, check out our templates: our [tutorial template](docs/tutorials/template/) and [component page template](docs/components/component/) are accessible on the site when building the docs in Draft mode, or accessible here on GitHub.
9+
> For help knowing what and how to write, check out [tutorial template](docs/tutorials/template.md) and our [component pages](docs/operate/reference/components).
1010
1111
## Build the docs locally
1212

@@ -19,37 +19,44 @@ To be able to build the docs locally, you need to install the following:
1919

2020
You can build the docs for local development using the following command:
2121

22-
```sh
23-
make serve-dev-draft
22+
```console
23+
make serve-dev
2424
```
2525

26-
If you would like to see the production view (without drafts and with minified CSS), run:
26+
To see the production view (without drafts and with minified CSS), run:
2727

28-
```sh
28+
```console
2929
make serve-prod
3030
```
3131

32-
You can also run `hugo serve` after installing Hugo to show the production view.
32+
> [!TIP]
33+
> You can also run `hugo serve` after installing Hugo to show the production view.
3334
3435
### Generate HTML docs
3536

36-
To generate the full HTML version of the docs run:
37+
To generate the full HTML version of the docs, run:
3738

38-
```sh
39+
```console
3940
make build-prod
4041
```
4142

4243
You can serve the resulting docs with:
4344

44-
```sh
45+
```console
4546
python3 -m http.server 9000 --directory public
4647
```
4748

4849
## Test the docs locally
4950

5051
### Python snippets
5152

52-
To ensure all python snippets are properly formatted before creating a commit, install [flake8-markdown](https://github.com/johnfraney/flake8-markdown) and add the following lines to the `.git/hooks/pre-commit` file in your local repository:
53+
To ensure all Python snippets are properly formatted before creating a commit, install [flake8-markdown](https://github.com/johnfraney/flake8-markdown):
54+
55+
```console
56+
brew install flake8
57+
```
58+
59+
Then, add the following lines to the `.git/hooks/pre-commit` file in your local repository:
5360

5461
```sh
5562
if [ "git diff --diff-filter=d --name-only HEAD | grep '\.md$' | wc -l" ];
@@ -63,17 +70,31 @@ fi
6370
```
6471

6572
If you don't already have a `.git/hooks/pre-commit` file in your `docs` git repo directory, you can copy the existing `pre-commit.sample` file in that directory as `pre-commit` to use the sample template, or create a new `pre-commit` file in that directory with the above content.
66-
If you create a new file, you must also make it executable with: `chmod 755 /path/to/my/.git/hooks/pre-commit`.
73+
If you create a new file, you must also make it executable with: `chmod +x /path/to/my/.git/hooks/pre-commit`.
6774

68-
To ensure your markdown is properly formatted, run `make markdowntest`.
75+
### Check markdown formatting
76+
77+
To ensure your markdown is properly formatted, run:
78+
79+
```console
80+
make markdowntest docs/**/*`
81+
```
82+
83+
### Check for broken links
84+
85+
To check locally for broken links, install [`htmltest`](https://github.com/wjdp/htmltest):
86+
87+
```console
88+
brew install htmltest
89+
```
6990

70-
To check locally for broken links, install [`htmltest`](https://github.com/wjdp/htmltest) and run `make htmltest`.
91+
Then, and run `make htmltest`.
7192

7293
### Lint JS and Markdown files with Prettier on save
7394

7495
1. Install the [Prettier VS Code Extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode).
75-
2. Run `npm install` in the docs folder where you have the docs checked out.
76-
3. Inside VS code, open the _user_ `settings.json` file by pressing `CMD+SHIFT+P` and typing 'settings', and add the following settings to the end of the file:
96+
1. Run `npm install` in the docs folder where you have the docs checked out.
97+
1. Inside VS code, open the _user_ `settings.json` file: Press `CMD+SHIFT+P`, type 'settings', select **Open User Settings (JSON)**, and append the following settings to the end of the file:
7798

7899
```json
79100
"[markdown]": {
@@ -90,4 +111,4 @@ To check locally for broken links, install [`htmltest`](https://github.com/wjdp/
90111

91112
## Publishing
92113

93-
The docs are automatically published when a PR merges.
114+
A GitHub workflow automatically publishes the docs to [https://docs.viam.com/](https://docs.viam.com/) when new commits appear in the `main` branch.

0 commit comments

Comments
 (0)