Skip to content

OntoInk

A MkDocs plugin that renders RDF/Turtle as interactive, publication-ready ontology diagrams — with SHACL constraints, OWL reasoning and live editing on the page.

PyPI Python CI License Stars
pip install ontoink

Not a screenshot. Click a node, drag it, right-click for align and selection tools, edit the Turtle below the canvas — the figure is generated from the source file at build time.

Graphs that hold up

Six layouts, level-of-detail and clustering for large ontologies, minimap, search, path finder.

SHACL, in place

Constraints drawn on the graph with cardinality badges, validated at build time with pySHACL, re-validated as you edit. Shape editor

Shapes, suggested

Classes with no SHACL coverage get a proposed sh:NodeShape from their instances and axioms — each constraint shown with the evidence behind it. See it work

OWL reasoning

HermiT, Konclude (native or WASM) or owlrl. Inferred triples overlay the asserted ones; consistency is reported, not assumed — and any inference the in-page reasoner made can show its proof.

Gates for CI

Competency questions run at build time as red/green cards; shape drift and quality scores land in ontoink-report.json and README badges.

Labels resolved

NFDI_0000118 reads as contributor role — labels are fetched from the referenced ontologies and reused in popups, autocomplete and results.

Arrange it yourself

Ctrl+click to multi-select, right-click to align, distribute and pin. Size, font and colour per node type. Undo included.

Figures you can publish

PNG and SVG with legend and prefixes, TTL export, and a CSP-safe embed bundle for pages outside MkDocs.


Three steps

pip install ontoink
# mkdocs.yml
plugins:
  - search
  - ontoink

markdown_extensions:
  - pymdownx.superfences:
      preserve_tabs: true
```ontoink
source: path/to/data.ttl
shape: path/to/shape.ttl
```

Full guide, fence options and deployment


Also in the browser, no install


Built at ISE — FIZ Karlsruhe in the context of NFDI and NFDI-MatWerk. Rendering by Cytoscape.js · MIT licensed.

Source PyPI Cite