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.1.tar.gz (237.7 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.1-py3-none-any.whl (239.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mkdocs_topoviewer-0.3.1.tar.gz
  • Upload date:
  • Size: 237.7 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.1.tar.gz
Algorithm Hash digest
SHA256 9307cc5d9c86efa4a5b08bb040adf98771fbfe3e02ea15d1b09ee986113e8cf5
MD5 c8764187fe18538bad4da401d4482d3a
BLAKE2b-256 875cd2d3c962d5ddbdf111c7022e61bbd31696c85a3b34e82902666bd6979d0f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mkdocs_topoviewer-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7809b75ff13059c368281046f0b82516029a008db5d60df91510b0030a203801
MD5 e8ef403bce4b8ae1054c2b01ac39833c
BLAKE2b-256 bb0703da9248e918f1c44a477a02716b9dae311c073774b7f6c3a3060f40792b

See more details on using hashes here.

Provenance

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