These docs explain Cobalt API with walkthroughs and examples of endpoints, fields, and query parameters. You can
easily add or edit pages using Markdown from the versions/
directory. All pages utilize a weight
property to
indicate where they're nested in navigation.
Cobalt API docs have been created with hugo and docuapi.
-
Install hugo:
brew install hugo
-
Or update if you already have it installed:
brew update && brew upgrade hugo
-
Install
markdownlint-cli
to check markdown files against some common rules:brew install markdownlint-cli
-
Build site and run server:
# V1 hugo server --config=versions/v1/config.yaml -D # V2 hugo server --config=versions/v2/config.yaml -D
-
Check markdown files with
markdownlint-cli
:markdownlint -c .markdownlint.yaml versions
Dependencies in the repository are managed with Go Modules.
-
To update
docuapi
theme, run:go get github.com/bep/docuapi/v2
-
To update
go
, edit thego.mod
file:go 1.19
-
To update
hugo
on Netlify, edit thenetlify.toml
file:HUGO_VERSION = "0.102.3"
The site uses Netlify's CD pipeline and is hosted at cobalt-public-api.netlify.app.
All commits to main
, if the build is successful, will be automatically deployed to the production site (usually
in < 1 minute).
Deploy previews
Any pull request against the main
branch will listen for new commits and is set to auto-build, available for
preview before merging (Click Details in the PR Check).
If you get found no layout file for "HTML" for kind "page"
warning when you start the server, you can clean up asset
caches by running hugo mod clean
.
For more information, see GrammarLinter.md