This is the center of Source Network's documentation.
$ npm install
$ npm run start
This installs necessary dependencies and starts a local development server. Most changes are reflected live without having to restart the server.
This website is built using Docusaurus 2.
Documentation is written using common markdown syntax or MDX syntax - the file extension will determine the syntax (.md for common markdown and .mdx for MDX).
Custom flags on code blocks metastring:
| Flag | Effect |
|---|---|
result |
Marks query/mutation output; auto-collapses when ≥ 12 lines, adds a stable codeblock-result class |
collapse |
Force the collapse UI on |
noCollapse |
Force it off |
expanded |
Collapsible, but starts open |
valid / invalid |
Green/red border + tinted title bar for correct/incorrect examples |
Example: ```json title="Result" result expanded
The website is automatically deployed using Cloudfare Pages.
To generate references, from defradb dir:
# CLI commands
rm -f ../docs.source.network/docs/defradb/references/cli/*.md
go run cmd/genclidocs/main.go -o ../docs.source.network/docs/defradb/references/cli
# HTTP API reference
go run cmd/genopenapi/main.go | python -m json.tool > ../docs.source.network/docs/defradb/references/http/openapi.jsonFeedback and pull requests appreciated!
