A component is a building block that a plain document can't draw: a warning box, a collapsible answer, a code block with syntax highlighting.
You write its name in parentheses, and Contito draws it on the site.
How each component looks is set once for the whole site, in Website > Design, as shown at the end of this article.
The components
| Component | What it draws | Settings |
|---|---|---|
| Callout | A highlighted box for a note, tip, warning or error | type: info (default), warning, error or success |
| Accordion | A collapsible section: the heading always shows, the rest opens on click. Several in a row read as an FAQ | heading: the line that always shows. open: true starts it expanded |
| Image | An image with a caption or a frame | src, caption, alt (a description for screen readers), frame, zoom (on by default) |
| Code Block | Code with syntax highlighting and a copy button | language, such as python, js or bash |
| Blockquote | A quotation, set apart from the text | none |
| Divider | A horizontal line between sections | none |
Four more components draw nothing. They set the article's details instead:
| Component | Sets |
|---|---|
| Description | The short summary shown under the title and in search results |
| Cover Image | The image shown in listings and link previews |
| Tags | The article's tags, separated by commas |
| Authors | The article's authors, one per line: Ada Lovelace <ada@example.com> |
See Article Details for what each detail does on the site.
Two ways to write one
Short form, for one paragraph
Start a normal paragraph with the name in parentheses, then each setting after a |, then the text:
- The part in parentheses has to be at the very start of the paragraph.
- A bulleted or numbered item can't be a component.
- Keep the part in parentheses in one style. Bold, a link or a different font across it turns it back into ordinary text.
- The text after it can be formatted as usual.
Table form, for anything longer
- Insert a table with one cell in its first row.
- In that cell, write the name in parentheses on the first line, then each setting on a line of its own.
- Put the content in the rows below: paragraphs, lists, headings and images all work.
Spelling
Ordinary text in parentheses is left alone: a paragraph starting with "(Optional)" stays a sentence, because Optional isn't a component.
A mistake never stops a sync. A component Contito doesn't recognize stays text or is skipped, and the rest of the article publishes. If something is missing on the page, check its spelling against the examples above.
Callout
Leave out type for an info callout.
The four types, as the site draws them:
Accordion
To start one open, or to give it more than one paragraph, use the table form:
Image
For a plain image, insert it in Google Docs with Insert > Image. Nothing else is needed.
For a caption or a frame, use the Image component with the image's web address:
| Setting | What it does |
|---|---|
src | The image's address. It has to start with https:// |
alt | A description for screen readers and search engines |
caption | A line shown under the image |
frame: true | Draws the image on a bordered surface |
zoom: false | Turns off click-to-zoom |
An image named by its address stays at that address and is not copied to your site. If the other site removes it, it disappears from yours too. Images inserted in the doc are copied.
Code Block
Put the code in the row below, exactly as it should appear:
Without the component, a paragraph in a code font also becomes a code block, without highlighting. See Formatting in Google Docs .
Blockquote
Divider
Write it on a line of its own. Insert > Horizontal line in Google Docs does the same.
Here is one:
Components for article details
These set the article's details and draw nothing.
Cover Image and Authors take the table form:
The email after a name is optional.
The Subtitle style also sets the description. See Formatting in Google Docs .
Where the look is set
Colors, icons, labels and borders of components are set for the whole site under Website > Design > Options.
Open a group to change it. The Callouts group:
| # | What it does |
|---|---|
| 1 | Edit in Kitchen Sink: shows when the page in the preview has no callouts. Switches the preview to a sample page that uses every component, so you see your changes. |
| 2 | Style: Accent bar, Outlined, Filled or Ghost. |
| 3 | Show Labels: adds a label such as "Warning" at the top of each callout. Below it, change each type's icon and label. |
Click Save to keep your changes, or Cancel to drop them. See Page Options .
Related
- Kitchen Sink : every component, rendered.
- Writing in Markdown : the same components as tags, for GitHub.
- Formatting in Google Docs