关注微信公众号
第一手干货与资讯
加入官方微信群
获取免费技术支持
The Rancher community library contains articles on Rancher products, Kubernetes, container management and orchestration, and related technologies. The following guidelines will help you produce content for our library by matching our style, tone, conventions, and workflow.
To simplify collaboration and publishing, we require article submissions to follow certain general rules.
Rancher tutorials are written as plain text files using the Markdown markup language. Markdown lets you specify how text should be formatted by including formatting indicators within the text itself. We use a variant of Markdown that includes a few helpful extensions.
When submitting an article for the Rancher library, please contribute it as:
You can compare the text documents in the [library repository]() against the versions [rendered on the Rancher website]() to get a better understanding of how formatting is applied. The style and formatting portions of this document will provide additional guidance about how articles are structured.
Follow these guidelines to learn how to compose your Rancher article. Use one of following templates as a starting point for your article:
While the templates demonstrate the basic structure of articles to help you get started, refer to this document for the canonical content guidelines.
Each article should include Hugo front matter at the top of the document to define metadata for the article.
Copy and paste the following template to create a YAML formatted front matter section at the beginning of your article:
--- title: "" author: date: description: "" type: "blog" tags: [] categories: [blog] image: "" draft: true ---
Fill in the following details:
title
author
john-smith
description
Leave the rest of the fields as they are. Your editor on the Rancher team will fill in the remaining information during the publication process.
Your article should be broken up into sections by using headings. You can further divide logical sections into subsections when sections become long or involve multiple, discrete segments.
##
###
Only break up a section into two or more subsections. Headings should be progressive, so avoid jumping from a level two heading (##) to a level four heading (####).
####
Here is an example of an appropriate heading hierarchy:
## Section ### Subsection ### Subsection ## Section
Avoid sections that only contain a single subsection:
## Section ### Subsection ## Section
Avoid skipping heading levels:
## Section #### Subsection #### Subsection ## Section
The following sections should be included in every article in the Rancher community.
Following the front matter, each article should start off with an introduction. This introduces the topic, outlines the scope of the content, and provides relevant context to help readers understand what the article will be about and how it might help them.
Introductions are typically 1-4 paragraphs long and explain the following:
An introduction that addresses these types of questions can help readers understand the value of the content and determine if it might be useful for their purposes. If you think that some additional context would be helpful, please include a background section as described below.
The main body of the article should be comprised of sections that break down the article’s focus into smaller scopes. The section titles and the format will differ depending on the type of article.
For instance, for procedural articles, sections are often split up according to the component being installed and configured, while comparison articles might break down sections based on the different options being evaluated.
The conclusion section should summarize what the article accomplished and what the reader should now understand or be able to do. Final notes or considerations can help users digest what they just read.
Typically, conclusions should contain links to additional resources that the reader can follow to learn more. For conceptual or comparison guides, this might include links to procedural guides to help the user implement the technology discussed. For installation and configuration guides, links to resources that cover usage, etc. can be helpful.
As a general rule, when available, we prefer links to resources within the Rancher community instead of external resources. For external content, we prefer resources from official sources to those from third parties.
Some sections may only be appropriate for certain styles of content or for topics that meet certain criteria.
Article type: (all)
If additional context would help readers understand the technology you’ll be working with or the processes you will be describing, you can optionally add a background section for further detail. To help keep the article length manageable, when possible, introduce and link out to existing Rancher resources instead of reproducing an explanation.
Article type: Procedural
The prerequisites section should almost always be included in procedural articles. This section outlines the resources required to successfully follow along with the guide. These should generally be technology requirements like:
Prerequisites should usually be provided as a bulleted list. The basic requirement in each bullet should be bolded, with additional context provided after a colon. A relevant link should almost always be included in the bullet’s description to help the reader fulfill the requirement.
For example:
If the end goal of a procedural article isn’t immediately apparent in the preceding sections, it may be helpful to include a goals section. This isn’t necessary if the end state is clear from earlier description.
Articles where a goals section might be helpful include:
A terminology section can introduce domain-specific words or phrases that the reader may need to know.
For procedural and comparison guides, this section should mainly focus on terminology that will be used throughout the rest of the guide. Usually, for these guides, you can introduce concepts as you need them without a dedicated section.
For conceptual guides, the terminology section should additionally define any common vocabulary the reader may come across when reading other sources or learning about related topics.
Article type: Comparison
For comparison articles, a section that introduces the methodology and framework being used to evaluate different alternatives is often helpful. The comparison framework section covers the criteria being considered during the comparison and may additionally list any characteristics that are not being evaluated in this particular guide.
To improve clarity and ensure consistency, Rancher articles follow certain typographical and formatting conventions.
For conventions on commonly used terminology, check out our word usage guide:
Bold text should be used to emphasize the following elements:
:
>
-
In general, avoid italics in favor of other methods of emphasizing text. Italics can be difficult to recognize in certain typefaces or sizes.
To bring attention to a specific section of text, use the inline highlighting functionality. You can surround text with {{% hl %}} and {{% /hl %}} to highlight it.
{{% hl %}}
{{% /hl %}}
This should primarily be reserved for the following scenarios:
ssh root@{{% hl %}}RANCHER_SERVER_IP{{% /hl %}}
ssh root@RANCHER_SERVER_IP
Use inline code formatting for the following types of information:
inline code
https://YOUR_SITE /login
Use notes to call attention to blocks of text. Render notes by wrapping text between the {{% note %}} and {{% /note %}} tags. Place notes before any commands they might affect.
{{% note %}}
{{% /note %}}
For instance, this…:
{{% note %}} This is a note. {{% /note %}}
…is rendered as:
NoteThis is a note.
This is a note.
Use warnings to notify readers of destructive actions or critical information. Place the warning message between the {{% warning %}} and {{% /warning %}} tags. As with notes, place warnings before introducing the operations they might impact.
{{% warning %}}
{{% /warning %}}
This warning…:
{{% warning %}} This is a warning. {{% /warning %}}
…is rendered like this:
WARNINGThis is a warning.
This is a warning.
Use code blocks to render entire blocks of text as preformatted, monospaced text. This is most often used for:
You can optionally include a supported language name with the opening code fence to enable syntax highlighting for the block. For instance, opening a code block with ```js indicates that the block should be interpretted and highlighted as Javascript code.
```js
``
Use screenshots to show important visual elements that are not easily represented through text. Screenshots are especially useful in these scenarios:
When taking screenshots, try to capture helpful surrounding context while maintaining focus on the important elements.
When working with screenshots, follow these rules:
Use diagrams to illustrate relationships, pipelines, workflows, and other complex interactions. Other images can provide context and visualize ideas expressed within the text. Some use cases for diagrams and images include:
As with screenshots, images should complement the textual explanation, not replace it.