Schema.org-style documentation for your schema.
We recommend managing your schema in a Github repo and running this software automatically when the schema changes using a Github Workflow.
- Create a Github repo with your JSON-LD application profile and schema files.
- Copy
workflow.ymlto/.github/workflows/in your repo. - Go to
Repo settings > Code and automation > Actions > Generaland set "Workflow permissions" to read and write. Note: you might have to enable this organization-wide. - Go to
Repo settings > Code and automation > Pages > Sourceand set Github pages "source" to "Github Actions". - Copy
example-config.jsonto the root of your repo and rename toconfig.json. Adjust the configuration according to your needs. Details can be found in the next section.
The configuration file can contain the following keys:
| Name | Description | Example |
|---|---|---|
schemas |
List of paths of schemas to take into account. If a directory is added, all files in that directory must be schemas and will be loaded. | ["./schemas", "./my_schema.ttl"] |
application_profile |
Path to the application profile. | ./jsonldcontext.jsonld |
domain |
List of properties that define the domain of a property in your schemas. Especially useful when using schema.org, which defines domain using their own domainIncludes property | ["http://www.w3.org/2000/01/rdf-schema#domain", "https://schema.org/domainIncludes"] |
range |
List of properties that define the range of a property in your schemas. Especially useful when using schema.org, which defines range using their own rangeIncludes property | ["http://www.w3.org/2000/01/rdf-schema#range", "https://schema.org/rangeIncludes"] |
title |
The title to use on the index page and the header of the docs. | Documentation for My Profile |
language |
The language to use for the documentation. Currently available: english |
english |
html_template |
The HTML template file to use | ./template.html |
output_folder |
Path where the output HTML files will be outputted | ./doc |
python -m venv venv
source ./venv/bin/activate
pip install -r requirements.txt
python main.py