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.3.2.tar.gz (238.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.3.2-py3-none-any.whl (239.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mkdocs_topoviewer-0.3.2.tar.gz
Algorithm Hash digest
SHA256 ddde4b84ce898af289e8989fa5770815ec6dc3e4af82a6ea8f868b7d20e83b3a
MD5 54d32b0a470f6f4fce0d62329b7625a2
BLAKE2b-256 fd47fc15086c6b14cdb78022cc129b5d1e6b971577d0181552af6e39c0e480c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_topoviewer-0.3.2.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.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_topoviewer-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 823ef66aad5888130cf46cc9d1794f75729a6cc92e260f655a0c1794fa520ef1
MD5 d1f038c584ef9320e2ff635e44df918d
BLAKE2b-256 9f3df37795afc8007593876bdaf6565fd8ee5518a2183a583e8867c61350c3e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for mkdocs_topoviewer-0.3.2-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