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
  • sparqld_port — Jinja variable containing the local endpoint port assigned during MkDocs setup
{{ 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.2.0.tar.gz (8.9 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.2.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mkdocs_macros_sparqld-0.2.0.tar.gz
  • Upload date:
  • Size: 8.9 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.2.0.tar.gz
Algorithm Hash digest
SHA256 e292cf86b3b23bdf3a2cd31bff6b73d65b32ca561abfaf7e0e9fa0999d042a30
MD5 6cb3fe409edf61a97e34a9414261cc22
BLAKE2b-256 b3056a78b7178737fb24d149ddae68fdd05d4e6d593b62aba096efd218c86c9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mkdocs_macros_sparqld-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d092536dab8b1d61037b922b92774d1b0eb93ed3afb9841d7119a77b3c926bd
MD5 bfe9b652f9889fba41e0d984dd39cc23
BLAKE2b-256 54c89860e7ebf0fd96a4fa2e4b9abce4a7c6939c49b37fc04dd1dc1c5d762613

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