Documentation
The Documentation schema is for written documentation pages, such as the ones on this site: an introduction followed by chapters, text, code, tables, lists, images and links. It ships with the Productivity docs package. See About schemas for schemas in general.
Schema and versions
Property | Value |
|---|---|
Schema names |
|
Package | Productivity docs |
Versioning | On — saves are kept in History when the subscription includes Revisions |
Indexed for search |
|
The package holds several versions of the schema, named with a number suffix (Documentation up to Documentation.5). The folder's New menu offers only the newest; existing documents keep the version they were created with. A document's Schema value is the full name, such as Documentation.5.
The page title is the document name; there is no title field.
Document fields
Field | Type | Meaning |
|---|---|---|
| Text | The lead under the title |
| Array | The page content — see the element types below |
| Text | Sort key, stored as a string such as |
| Check box | "No index (Google)". On by default — set it to |
| Check box | Show a menu with Edit this document and Open folder in the page header. On by default |
| Check box | Hide the header, hide the side menu, disable folding of chapters, show anchors, number the headings |
| Text | Bootswatch theme name, or the URL of your own stylesheet when |
| Text | Theme for code blocks, or your own stylesheet |
| Check box, text, image | "Official document": a document number and a classification mark in the header |
Element types
Each item in Elements is an object with an ObjectVariant:
ObjectVariant | Fields |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| A horizontal rule; no fields |
|
|
Array fields are stored with a companion …_type key ("Elements_type": "Elements"). Keep it when you write documents yourself.
Example
The Document part of a small page:
{
"NoIndex": false,
"SortOrder": "1",
"Introduction": "How to install the tool.",
"Elements": [
{
"ObjectVariant": "Chapter",
"Expand": true,
"Title": "Install",
"Elements": [
{ "ObjectVariant": "Text", "Text": "Sign in first:" },
{ "ObjectVariant": "Code", "Mode": "bash", "Code": "docly login" }
],
"Elements_type": "Elements"
}
],
"Elements_type": "Elements"
} Templates and publishing
Template | Output |
|---|---|
Publish version | The web page — allowed for publishing |
Download version | A standalone HTML file |
Embed version (no css), Embed version (including css) | Versions for embedding the page in another site |
PDF dokument | PDF, for download |
Spellcheck (report), Suggest improvements (report), Check spelling | AI reports: spelling and suggested improvements |
On a published site, a document of this schema is rendered with the site's display template #/Documentation.5.hash (or #/Documentation.5.html) when there is one. Without it, Docly uses the first template in the schema that allows publishing — here Publish version. See Create display templates for your schemas.
The schema's own templates convert text with docly.toHtml. This site uses its own #/Documentation.5.hash, which renders Text, table cells and list items with docly.markdown — that is why its pages can use markdown. What a field may contain depends on the display template, not on the schema.
Create one
Install the Productivity docs package in the workspace (Standard packages), then choose the schema in a folder's New menu.
From a script, the drive or the CLI: write a
.doclyfile whoseSchemaisDocumentation.5— see The Docly file format and Creating new docly files. Copy an existing document for the full field set.