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

The pluglet requires a POSIX environment because it uses sh to start the server. Install sparqld 0.1.9 or later on PATH, or point extra.sparqld.binary at the executable.

Configuration

Register the pluglet with mkdocs-macros:

plugins:
  - macros:
      modules: [mkdocs_macros_sparqld]

The pluglet reads sparqld.toml next to mkdocs.yml. If the file is missing, the pluglet creates it with directory = "docs". It uses the file's source settings and uses docs/ if the file omits directory. It starts a temporary HTTP server on a free port on localhost. The server loads the dataset once.

Optional overrides under extra.sparqld:

extra:
  sparqld:
    directory: data                    # overrides sparqld.toml for MkDocs
    binary: target/debug/sparqld       # default: sparqld on PATH

If you set extra.sparqld.directory, the pluglet uses it to seed a new sparqld.toml. An existing file keeps its contents.

Macros and filters

  • Use sparql('SELECT …') to run a SPARQL query.
  • Use stored_sparql('path/from/mkdocs/root.rq') to run a query file relative to the MkDocs project root.
  • Apply the sparql_table filter to render SELECT bindings as a Markdown table.
  • Use roadmap_mermaid('path/to/query.rq', target_iri) to render a roadmap as a Mermaid flowchart. Omit target_iri to show all results. The query must return roadmap_item, title, and kind columns. Supported kinds are goal, task, bug, decision, and position. Optional columns are status, group, group_title, blocker, blocker_title, blocker_kind, and contribution. Positions require a decision in group; relationship endpoints require labels. Cycles fail the build. Configure a Mermaid fence as described in the MkDocs Material diagram guide.
  • Read the local endpoint port from the sparqld_port variable.
{{ stored_sparql('docs/queries/names.rq') | sparql_table }}

License

Apache-2.0 OR MIT

Metadata

Release files for mkdocs-macros-sparqld 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-macros-sparqld 0.3.2
File Size Uploaded Provenance Actions
mkdocs_macros_sparqld-0.3.2.tar.gz 16.7 kB Without provenance Details for mkdocs_macros_sparqld-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-macros-sparqld 0.3.2
File Interpreter ABI Platform Actions
mkdocs_macros_sparqld-0.3.2-py3-none-any.whl Python 3 none any Details for mkdocs_macros_sparqld-0.3.2-py3-none-any.whl

Total release size: 42.6 kB

Release files / mkdocs_macros_sparqld-0.3.2.tar.gz

Download URL mkdocs_macros_sparqld-0.3.2.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6d5893ab97e71fc261f08a1c6d769149bdede4dc8846ab35028c1d9d424828b5
BLAKE2b-256 checksum
How to use checksums
be8093f015ba3bd5f92139091433f53b2715f80517001e8e682ec97bbfe17304
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.8 Linux/6.8.0-149-generic

Release files / mkdocs_macros_sparqld-0.3.2-py3-none-any.whl

Download URL mkdocs_macros_sparqld-0.3.2-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa0d805af80a635c29b2fd2c2a3765659d994670d4916fc6f42e2485f9e2a88d
BLAKE2b-256 checksum
How to use checksums
0d13086fb0fe4faa437de567100b3f5bd9fb0d53b3f69449c0b709fe832c8268
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.13.8 Linux/6.8.0-149-generic

Security for mkdocs-macros-sparqld 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page