ud3tn/doc
Maximilian Nitsch a837c7d722 docs: Add manpage to mkdocs
Uses pandoc to convert the manpage into a markdown document and add it
to the mkdocs documentation.

Signed-off-by: Maximilian Nitsch <maximilian.nitsch@d3tn.com>
2025-06-13 17:55:24 +02:00
..
css Move file to image-material directory, adjust CSS 2024-11-15 09:52:57 +01:00
development doc: Link Protobuf docs instead of .proto files 2024-12-05 16:58:01 +01:00
image-material doc: Add white background with some spacing to SVG figures 2024-11-16 12:01:22 +01:00
references docs: Add manpage to mkdocs 2025-06-13 17:55:24 +02:00
tools doc: Fix some broken links 2024-11-15 11:32:21 +01:00
usage router_agent, mk: Add stub of JSON configuration feature 2025-06-05 17:03:39 +02:00
aap20.md doc: Link Protobuf docs instead of .proto files 2024-12-05 16:58:01 +01:00
architecture-overview.md doc: Link Protobuf docs instead of .proto files 2024-12-05 16:58:01 +01:00
Bundle-in-Bundle Encapsulation_(BIBE).md Add index.md file, change documentation structure, add new elements and images to folders, add CSS 2024-11-15 07:59:32 +01:00
contacts_data_format.md Add existing documentation material to MkDocs 2024-11-12 11:33:24 +01:00
index.md doc: Add alt text to image on overview page 2024-11-16 12:01:22 +01:00
perf_events.md Add existing documentation material to MkDocs 2024-11-12 11:33:24 +01:00
posix_quick_start_guide.md router_agent, mk: Add stub of JSON configuration feature 2025-06-05 17:03:39 +02:00
python-venv.md Add existing documentation material to MkDocs 2024-11-12 11:33:24 +01:00
README.md docs: Add manpage to mkdocs 2025-06-13 17:55:24 +02:00
sqlite-storage.md doc: Link Protobuf docs instead of .proto files 2024-12-05 16:58:01 +01:00
testing.md doc/testing: Document that now we need -r in integration tests 2025-06-06 09:01:41 +02:00
ud3tn.1 Bump dates and versions for v0.14.2 2024-12-04 11:00:42 +01:00
ud3tn_aap.md Minor changes to URLs and visuals 2024-11-15 12:20:56 +01:00

Documentation

MkDocs

An HTML version of the μD3TN documentation is created via MkDocs. All files stored in the MkDocs directory are taken into account. The MkDocs configuration can be changed in the mkdocs.yaml file. To add further pages to the navigation, they must be added to the nav section.

Prepare

  • w/o nix

    • Install pandoc

    • Install protoc

    • Install protoc-gen-doc via your package manager, go install or another preferred method

      To install it as an unprivileged user in a subdirectory of the work tree:

      GOBIN=$(pwd)/.gobin/ go install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
      # Then, run all protoc commands as follows:
      PATH=$(pwd)/.gobin/:$PATH protoc ...
      
    • Install mkdocs and relevant Python dependencies (preferably use a virtual environment)

      pip install -U mkdocs
      pip install $(mkdocs get-deps)
      
  • w/ nix (see also the µD3TN documentation on it)

    nix develop '.?submodules=1'
    

Develop

# create markdown docs from manpage
pandoc \
  --from man \
  --to gfm+definition_lists \
  --shift-heading-level-by 1 \
  --output doc/references/manpage.md \
  doc/ud3tn.1
# Create markdown docs from protobuf
protoc \
  --doc_out=doc/references/protobuf \
  --doc_opt=markdown,index.md \
  components/aap2/aap2.proto \
  components/agents/storage/storage_agent.proto
# Run dev-server for live preview of HTML documents (without protobuf)
mkdocs serve

Build

# w/o nix
make doc

# w/ nix
nix build .#mkdocs-html

Deploy

When changes are made to the master branch, the latest version of the documentation is automatically built and published at https://d3tn.gitlab.io/ud3tn.

Man Page

There exists also a man page for μD3TN, which can be viewed with

man --local-file ud3tn.1