Skip to main content

MkDocs plugin for embedding TopoViewer declarative topology diagrams.

Project description

mkdocs-topoviewer

Support status: Supported

mkdocs-topoviewer is the MkDocs plugin wrapper for TopoViewer. It lets MkDocs users install TopoViewer with pip and embed declarative topology diagrams with a fenced Markdown block.

This package is licensed under Apache-2.0, like TopoViewer. It is publish-shaped for intentional public Python package releases, while private/customer-specific material should stay in separate packages or private indexes.

Repository Boundary

This package is intentionally separate from the npm renderer package, but both packages are intended to live in one monorepo:

topoviewer/
  package.json            # npm workspace orchestrator
  packages/
    topoviewer/           # npm package: topoviewer
    mkdocs-topoviewer/    # Python package: mkdocs-topoviewer

The renderer package owns the React component, compiler, schemas, and browser bundle. This package owns only the MkDocs integration: fenced-block parsing, page-relative reference resolution, asset injection, and packaging the approved browser bundle for Python users.

The dependency direction is one way: build TopoViewer first, then vendor its browser-ready embed assets into this package. MkDocs users should not need npm, Vite, React, or TypeScript in their documentation build pipeline.

Install

Install from PyPI:

pip install mkdocs-topoviewer

For local plugin development inside the TopoViewer repository:

pip install -e packages/mkdocs-topoviewer

Private distribution should use an approved package index:

pip install --index-url https://<private-index>/simple mkdocs-topoviewer

Configure

plugins:
  - search
  - topoviewer

Optional plugin config:

plugins:
  - topoviewer:
      asset_path: assets/topoviewer

Use

```topoviewer
topology: ./topoviewer-topo.yaml
stylesheet: ./topoviewer-style.yaml
height: 640px
title: MV network SR-TE service path
controls: true
controlsOpen: false
```

The plugin resolves topology and stylesheet relative to the Markdown page.

What The Plugin Ships

The Python package vendors the browser-ready TopoViewer bundle:

  • topoviewer-embed.iife.js
  • topoviewer-embed.css
  • topoviewer-mkdocs.css

MkDocs receives those files as generated site assets. Projects using the plugin do not need to run npm or copy assets manually.

Development

When the TopoViewer browser bundle changes, refresh the vendored assets from the npm package:

cd ../topoviewer
npm run build
npm run sync:mkdocs

When changing only this Python plugin, work from this package root:

python -m pip install -e .
python -m build

The plugin package should remain independently buildable and publishable. Do not import source files from ../topoviewer; use only the vendored browser assets under mkdocs_topoviewer/assets/.

Release Model

  • mkdocs-topoviewer is the MkDocs wrapper for the stable TopoViewer browser bundle.
  • Public plugin releases should contain stable behavior, docs, schemas, and vendored assets.
  • Internal preview builds should use approved private package indexes.
  • Customer-specific templates, private assets, or proprietary importers belong in separate private packages, not in this generic plugin.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_topoviewer-0.2.0.tar.gz (227.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_topoviewer-0.2.0-py3-none-any.whl (228.8 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_topoviewer-0.2.0.tar.gz.

File metadata

  • Download URL: mkdocs_topoviewer-0.2.0.tar.gz
  • Upload date:
  • Size: 227.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mkdocs_topoviewer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1aee6a1af1a61d118a4ae4b22ccdee865222f0243668abd799d1918b6feb5f79
MD5 a6a0a633aeea1787934068a2aa8dc7ce
BLAKE2b-256 9f4822cd1485266f64352af93f7a72a08e9c7349294004a66e411ed34840f5a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_topoviewer-0.2.0.tar.gz:

Publisher: pypi-publish.yml on asadarafat/topoviewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mkdocs_topoviewer-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_topoviewer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 247973a8ec8cda4da06a24971335c9c13ed1ce2d257d0a3372d4626ba7cf44e4
MD5 fce91935074f8b81d0eb7621ca281670
BLAKE2b-256 f14211a2409ae9a82944cabbeaceea64237dc6e26c633c1d80c55ae089da75f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_topoviewer-0.2.0-py3-none-any.whl:

Publisher: pypi-publish.yml on asadarafat/topoviewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page