• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

CleverCloud/doc.clever-cloud.com: Markdown content of the Clever Cloud documenta ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

CleverCloud/doc.clever-cloud.com

开源软件地址(OpenSource Url):

https://github.com/CleverCloud/doc.clever-cloud.com

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

Clever Cloud Documentation

In this repo you will find all the content from the Clever Cloud Doc.

As this documentation is open for content contribution, any helpful pull-request will be merged.

Example of Relevant Topics

  1. Text of schematic content improvements
  2. Grammar or orthograph improvements
  3. Any revelant pieces of infos from our mail support
  4. Tutorials to setup a supported technology/framework.

Contributing Process

You can either make a pull-request OR submit a content via the Contribute button here: https://www.clever-cloud.com/doc

Coding style

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:

require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html

We use highlightjs to perform language detection and syntax highlighting. You can find out which keywords are valid here.

Write and use partials

Partials are located under the partial folder at the root of this project. They are written in Markdown.

Rendering partial in page

Partials are called using the following shortcode:

{{< readfile "/path/to/partial/from/root/of/project.md" >}}

Using variables in a partial

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:

  1. 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@
  1. 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@.
folder/file.md

---
...
str_replace_dict:
  "@addon-name@": "PostgreSQL"
  "@addon-name@": "PostgreSQL"
---

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.

Creative Commons License




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap