Skip to main content

mkdocs-macros-sparqld

mkdocs-macros pluglet that runs sparqld during mkdocs build / mkdocs serve and expands SPARQL macros into rendered pages.

Full documentation: MkDocs integration

Install

pip install mkdocs-macros-sparqld

Also install the sparqld binary and keep it on PATH, unless you override extra.sparqld.binary.

Configuration

Register the pluglet with mkdocs-macros:

plugins:
  - macros:
      modules: [mkdocs_macros_sparqld]

Nothing else is required when sparqld is on PATH and the served tree is the project's docs/ directory.

Optional overrides under extra.sparqld:

extra:
  sparqld:
    directory: data                    # default: docs
    binary: target/debug/sparqld       # default: sparqld on PATH

Macros and filters

  • sparql('SELECT …') — run a verbatim SPARQL query; SELECT returns a list of binding dicts
  • stored_sparql('path/from/mkdocs/root.rq') — run a query file relative to the MkDocs project root
  • sparql_table — Jinja filter that renders SELECT bindings as a Markdown table
{{ stored_sparql('docs/queries/names.rq') | sparql_table }}

License

Apache-2.0 OR MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkdocs_macros_sparqld-0.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mkdocs_macros_sparqld-0.1.1-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file mkdocs_macros_sparqld-0.1.1.tar.gz.

File metadata

  • Download URL: mkdocs_macros_sparqld-0.1.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.13.9 Linux/6.8.0-136-generic

File hashes

Hashes for mkdocs_macros_sparqld-0.1.1.tar.gz
Algorithm Hash digest
SHA256 04baf6fe46a16a473bed74359c10732320a732c58dcf3a89cc90b9128a2649ee
MD5 e4cfe2ea9602307ced1d4fb3ad516baa
BLAKE2b-256 1d66343da5d8e5f1a95b4c30cbaddd70db550d846f8a87d10fb6c2bccd35c873

See more details on using hashes here.

File details

Details for the file mkdocs_macros_sparqld-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mkdocs_macros_sparqld-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95334eed4e94eef95d0c0f6a6182ab203236e5aabe2b4760442b2d84aa2251c8
MD5 e1bf1dfe70eff46798fda3ce98b719f5
BLAKE2b-256 abcd335067ea64747507b595f53738844e1a415a4f437ce5ff7dcfb19217cf6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page