You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Beginning from version 0.3.0 the default graph inside the sidebar was minimized to edges related to the current page only. The previous behavior can be restored by setting global to true at line draw_graph_sidebar(myChart, global=false) at top of javascript file.
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].