Skip to content

Latest commit

History

5,309 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

publishedexternal link checkNetlify Status

Welcome to the Viam Documentation

Note

Looking to contribute? Check out the Contributor Guide. For help knowing what and how to write, check out tutorial template and our component pages.

Build the docs locally

To be able to build the docs locally, you need to install the following:

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

make serve-dev

To see the production view (without drafts and with minified CSS), run:

make serve-prod

Tip

You can also run hugo serve after installing Hugo to show the production view.

Generate HTML docs

To generate the full HTML version of the docs, run:

make build-prod

You can serve the resulting docs with:

python3 -m http.server 9000 --directory public

Test the docs locally

Python snippets

To ensure all Python snippets are properly formatted before creating a commit, install flake8-markdown:

brew install flake8

Then, add the following lines to the .git/hooks/pre-commit file in your local repository:

if [ "git diff --diff-filter=d --name-only HEAD | grep '\.md$' | wc -l" ];then
list= $(git diff --diff-filter=d --name-only HEAD | grep '\.md$')foritemin$listdo
flake8-markdown $itemdonefi

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. If you create a new file, you must also make it executable with: chmod +x /path/to/my/.git/hooks/pre-commit.

Check markdown formatting

To ensure your markdown is properly formatted, run:

make markdowntest docs/**/*`

Check for broken links

To check locally for broken links, install htmltest:

brew install htmltest

Then, and run make htmltest.

Lint JS and Markdown files with Prettier on save

  1. Install the Prettier VS Code Extension.
  2. Run npm install in the docs folder where you have the docs checked out.
  3. Inside VS code, open the usersettings.json file: Press CMD+SHIFT+P, type 'settings', select Open User Settings (JSON), and append the following settings to the end of the file:
"[markdown]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.configPath": ".prettierrc",
"prettier.documentSelectors": ["**/*.md"],
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
"prettier.withNodeModules": true,
"prettier.resolveGlobalModules": true,
"prettier.requirePragma": true

Publishing

A GitHub workflow automatically publishes the docs to https://docs.viam.com/ when new commits appear in the main branch.

Continuous integration

GitHub Actions workflows run linting and link checks on every pull request, publish and sync search on merges to main, and validate code samples and SDK coverage on a weekly schedule. The table below is a quick reference; see .github/workflows/README.md for full descriptions, triggers, secrets, and known issues.

WorkflowWhat it doesWhen it runsBlocks PR?
vale-lint.ymlVale prose style checkPull requestYes
codespell.ymlSpell-check docs/Pull requestYes
run-htmltest-local.ymlInternal link checkPull requestYes
markdown-lint.ymlMarkdown structure lintPull requestInformational
prettier-lint.ymlPrettier formatting checkPull request, push to mainInformational
python-lint.ymlLint Python snippets in MarkdownPull requestInformational
pr-labeler.ymlAdd safe to build label / welcome commentPR openedNo
alias-reminder.ymlRemind authors to add redirect aliasesPR moved filesNo
docs.ymlBuild site, sync search indexPush to mainN/A
inkeep.ymlSync docs source to Inkeep AI searchPush to main (docs/)N/A
run-htmltest.ymlExternal link checkTuesdays 10:00 UTCN/A (opens ci-failure issue)
test-code-snippets.ymlRun Python/Go/TS code samples against live ViamMondays 09:00 UTC, push to samplesN/A (opens ci-failure issue)
check-methods.ymlCheck docs coverage of SDK API methodsWednesdays 10:00 UTCN/A (opens ci-failure issue)

Note

The scheduled test-code-snippets.yml and check-methods.yml jobs run against a live Viam test organization and external SDK sites, so their results depend on that org's state and on upstream changes. See .github/workflows/README.md for details.

On failure, the scheduled jobs open a deduplicated GitHub issue labeled ci-failure. A daily CI-failure triage routine (a scheduled Claude Code session) then reviews those issues and either opens a fix PR titled [Claude CI Failure] … or comments with the root cause. See CI failure triage for the full flow, schedule, setup, and prompt.

About

Source code of docs.viam.com.

Topics

Resources

Code of conduct

Stars

8 stars

Watchers

5 watching

Forks

Used by

Contributors

Languages