A MkDocs plugin that generates a obsidian like interactive graph
Project description
Interactive Graph for Material for MkDocs
Plugin for Material for MkDocs to draw an interactive graph like Obsidian. The graph inside the sidebar is just available for non-mobile website. The modal view via the button next to the light/dark mode switch shall work on all devices.
Refer Github Pages for a demonstration of the interactive graph in Material for MkDocs.
Installation
Available on PyPI.
Install via pip install mkdocs-obsidian-interactive-graph-plugin
or add it to your requirements.txt
.
Usage
Setup in MkDocs
Activate the plugin in mkdocs.yml
, but note that this plugin has to be located before plugins, that replace wikilinks by markdown links. Currently just wikilinks like [[Link#Anchor|Custom Text]]
are supported.
plugins:
- obsidian-interactive-graph
extra_javascript:
- https://fastly.jsdelivr.net/npm/jquery/dist/jquery.min.js
- https://fastly.jsdelivr.net/npm/echarts/dist/echarts.min.js
- assets/javascripts/interactive_graph.js
extra_css:
- assets/stylesheets/interactive_graph.css
Graph Javascript by Apache ECharts
A interactive_graph.js
example can be downloaded from here and must be located into the docs directory under docs/YourSiteName/assets/javascripts/interactive_graph.js
.
Docker
Adapt the .env
and mkdocs.yml
files to your needs. DEV=ON
will rebuild the mkdocs-obsidian-interactive-graph-plugin
from local files. If DEV != ON
the upstream packages of PyPI will be used. Build and start the Docker container via docker compose up --build [-d]
.
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file mkdocs_obsidian_interactive_graph_plugin-0.2.6.tar.gz
.
File metadata
- Download URL: mkdocs_obsidian_interactive_graph_plugin-0.2.6.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd08b2d921c7e922e6036c062c8c3339a55e4b62c1c04a5c8341b02108faeccf |
|
MD5 | 32be34fb0d2fbee7766230fd6feecb74 |
|
BLAKE2b-256 | 936d8a1601517514ad050b296f4bca1ddaa9b82bfba667f41fa1af94269b8345 |