Each page begins with a YAML section used for metadata, and the rest of the article is written in markdown. Make sure to reduce inline HTML to the maximum, although it is needed for some table formatting.
YAML section
title: The title used for the search result and the H1 of the article page.
shortdesc: Used to search terms via Algolia and shows up when you're using the search.
tags: The tags are used to categorize the article in sections (within Account Setup, Dashboard Setup, CLI, Apps, Addons, Developer, Billing, Support and FAQ)
keywords: Used to reference the article in Algolia's index for improved search (optional).
Article section
The first header in your content should be a H2, as the H1 will be used by the title variable in the YAML section.
You can add an optional language identifier to enable syntax highlighting in your fenced code block.
For example, to syntax highlight Ruby code:
You may want to display different chunks of partial content depending on which page you are working on.
This is achieved by creating two things:
a placeholder word to replace in the partial content.
This placeholder word must:
begin and finish with an @
be the most self-explanatory possible
be used only once in this partial unless specific case (see note below)
not be used in other partials unless you want to replace it with the exact same value
Example placeholder word: @addon-name@
creating the key str_replace_dict in the front matter section and add to it the matching placeholder word and their replacements.
You must add this in the front matter of each page using the partial.
e.g:
str_replace_dict:
"@addon-name@": "my addon name"
"@another-variable@": "other variable replacement str"
Notes:
the function used to find and replace uses regex, please make sure not to use reserved characters. If you have to use some, think about it twice and if you still need them, escape them properly.
the function will only replace the first occurence it founds, if you have to replace two times the same key, have it appear twice in the front matter str_replace_dict also.
e.g:
partial/mypartial.md
Text @addon-name@ holding two codes @addon-name@.
Output: Text PostgreSQL holding two codes PostgreSQL.
Licence
Clever Cloud Doc by Clever Cloud is licensed under a Creative Commons Attribution 4.0 International License.
Based on a work at https://www.clever-cloud.com/doc.
请发表评论