Variables provide reusable values for authored documentation and selected manifest metadata. Define user variables in the top-level variables object in docinsight.json; DocInsight also provides built-in project and system variables.
A variable can be a string, a link, or an object whose fields contain those values:
{
"variables": {
"product_name": "My Library",
"company": {
"name": "DevJet Software",
"homepage": {
"type": "link",
"label": "DevJet Software",
"href": "https://devjetsoftware.com/"
}
},
"documentation_title": "{{project.title}} documentation"
}
}
Variable names start with an ASCII letter and contain only ASCII letters, digits, or underscores. Lookup is ASCII case-insensitive, but DocInsight preserves the spelling in the manifest. The same rules apply to each segment of a dotted variable path.
Each key in the top-level variables object defines a variable. Project names do not implicitly define variables, even when project.name is a valid variable identifier.
Do not use a reserved variable name such as sys, workspace, project, site, target, content, topic, page, or api.
String variables can reference other variables. Link labels and targets are literal and do not expand variable references.
The project variable exposes project metadata such as name, title, description, homepage, repository, license, and copyright. For example, {{project.title}} renders the configured project title.
The built-in sys.docinsight variable renders a link to DocInsight and exposes its label and href fields.