Skip to main content

mkdocs-techdocs-version-selector

MkDocs plugin that builds versioned TechDocs static sites from version mappings defined directly in mkdocs.yml.

What it does

  • Reads versions from plugin config (versions) in mkdocs.yml
  • Does nothing when there are no configured versions or only one configured version
  • Builds each configured git branch/tag into a dedicated subdirectory (for example site/__v2, site/__v3)
  • Writes multiversion.json for the TechDocs version selector
  • Adds a root/default manifest entry using root_version_name (with path /)
  • Prevents recursive re-execution during child version builds

Installation

pip install mkdocs-techdocs-version-selector

Configuration

Configure the plugin in mkdocs.yml:

plugins:
  - techdocs-version-selector:
      root_version_name: latest
      versions:
        - v2: v2
        - v3: v3
      site_subdir_prefix: "__"
      manifest_filename: multiversion.json
      techdocs_cli_command: ["techdocs-cli"]

Config reference

  • versions (list): list of one-entry maps where key = version label and value = git branch/tag
    • Example: - v2: release/2.0
  • root_version_name (string, default: root): display name written for the default/root docs version in multiversion.json
  • site_subdir_prefix (string, default: __): prefix for version output folders under site/
  • manifest_filename (string, default: multiversion.json): manifest filename under site/
  • techdocs_cli_command (list, default: ["techdocs-cli"]): command used to run TechDocs generation

Example multiversion.json

After a successful build, site/multiversion.json will look like:

{
  "latest": {
    "name": "latest",
    "latest": true,
    "path": "/"
  },
  "v2": {
    "name": "v2",
    "latest": false,
    "ref": "v2",
    "path": "/__v2/"
  },
  "v3": {
    "name": "v3",
    "latest": false,
    "ref": "v3",
    "path": "/__v3/"
  }
}

Requirements

  • Python 3.9+
  • mkdocs
  • git available on PATH
  • techdocs-cli available on PATH (or configure techdocs_cli_command)

Metadata

Release files for mkdocs-techdocs-version-selector 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-techdocs-version-selector 0.1.4
File Size Uploaded
mkdocs_techdocs_version_selector-0.1.4.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-techdocs-version-selector 0.1.4
File Interpreter ABI Platform
mkdocs_techdocs_version_selector-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / mkdocs_techdocs_version_selector-0.1.4.tar.gz

Download URL mkdocs_techdocs_version_selector-0.1.4.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9a774eca6320e0fd9a732c6cf77512cbbb34223254099d85f314e4b838e98c93
BLAKE2b-256 checksum
How to use checksums
ba1d1b0bea03d78387d2ef6aac2612249aacd17c302c80510eefec0e7d54e20d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / mkdocs_techdocs_version_selector-0.1.4-py3-none-any.whl

Download URL mkdocs_techdocs_version_selector-0.1.4-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
473f74c3307598030270014cc74aadf3651fa8541747352ac78c56a985884484
BLAKE2b-256 checksum
How to use checksums
ce42904395995eaf3caa5ca397c69ae7ddf6ef1582e629efd086fd29156da978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page