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

Target install after package publication:

pip install mkdocs-topoviewer

Local development install:

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.1.0.tar.gz (214.3 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.1.0-py3-none-any.whl (216.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mkdocs_topoviewer-0.1.0.tar.gz
  • Upload date:
  • Size: 214.3 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.1.0.tar.gz
Algorithm Hash digest
SHA256 50790188d88128480e5467b5ed1193497e57c1224f5799bb54ec6949c9ed3b00
MD5 985f78d80388f6c854c6efce5e9a54b6
BLAKE2b-256 2656aa3b6ea51915fdc79fd5aee3497f63439bc945f01af088db3421ed0df8b4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mkdocs_topoviewer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4efdfadebe0489b0a94de621e88cb6d9370ef46a4b109091407c252d7ad36db6
MD5 fbf7532c4630edb92fc15e786b01be16
BLAKE2b-256 6ac432426b02c7a2d206e5857c0851f194e6f856c64f61c3c6e885ccbf1c0039

See more details on using hashes here.

Provenance

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