This is the multi-page printable view of this section. Click here to print.
Documentation
We welcome community contributions to keep this documentation current! Click Edit Page in the top right corner to propose changes to this article. See Updating Content for more information.
The TrueNAS project welcomes all documentation contributions!
The Documentation Hub uses Hugo to create the documentation websites. Articles are written in a combination of Markdown and HTML syntax.
The tutorials in this section are designed to guide you with different kinds of documentation contributions and two different tutorial article templates. There is also an article template that you can copy and use to submit new articles. Please feel free to propose changes and add new content to these articles to help others learn how to contribute to project documentation!
Want to discuss your in-progress changes or other TrueNAS contributions?
The TrueNAS contributors #truenas-docs Slack workspace is available for contributors to discuss their changes and help each other improve the software.
You can request to join this workspace at truenas.slack.com.
Content Styling
This guide has many examples of how to style your documentation contributions. TrueNAS documentation uses standardized Commonmark Markdown, HTML, and Hugo syntax to transform text, add images, stylize tables, and link to other locations. The guide is not exhaustive but contains examples of the elements that are most commonly used when writing TrueNAS documentation. To learn more about each markup language, see these resources:
- Markdown: https://daringfireball.net/projects/markdown
- Commonmark: https://spec.commonmark.org/
- HTML: https://www.w3schools.com/html/default.asp
- Hugo: https://gohugo.io/documentation/
Markdown Examples
TrueNAS Documentation Hub articles make use of the following formatting options:
Hugo Style Elements
There are many style elements you can use that are built into the Hugo static site generator. This site uses Hugo shortcode syntax for images, internal references, and admonition boxes.
General Content Rules to Follow
Do not use the following in your articles:
The word will. It either does or does not do something. Use active voice and present tense when writing content. For example, do not type “The system will restart.” Instead, use “The system restarts.”
The word may. We all say it but we are not giving permission to do something, we are saying it might do something. You can also replace may with can or should if these words better describe the situation. Only use may when granting permission to do something.
Do not use possessive case. Replace the (’s) instances with a statement. For example, do not say “The system’s IP address.” Instead, say “The IP address for the system.” You can use its or their, but try to avoid possessives where possible.
Do not use contractions. Contractions do not translate well for non-English and English as a second language reader populations. For example, change instances such as doesn’t to does not.
Spell out numbers between one and ten when referring to numbers of items in general terms. If you are referring to entering a number, type the digit (for example, enter 1 in the field). Use digits for numbers greater than ten.
Updating Content
Changes wanted! Contributing changes to the TrueNAS documentation has never been easier. The Documentation Hub is specifically built to allow users to quickly propose changes to the content without having to install any special applications. All that is required is to have a GitHub account and a basic understanding of Markdown .
You need to log in to your GitHub account to propose any changes. The repository automatically builds a preview site for each open pull request (PR) created in GitHub. The link to this preview site is added to the PR as a comment. The preview updates with the changes you make to the pull request, so you can always see an accurate preview of the changes you make to the website.
Making Quick Changes to an Article
We welcome community contributions to keep the documentation current!
Click Edit Page in the top right corner of an article screen to propose changes to the article.
To check your changes for bugs in the Markdown or HTML syntax, switch to the Preview changes tab. The preview renders generic Markdown but does not render Hugo-specific syntax.
Replacing an Image
To update an existing image, click Edit Page and find the image location and name in the article source text. Name a replacement image with the same name as the existing image you are replacing.
In the repository, click Code and go to the image location in the repository.
Images are located in the
Click Upload files and either drag and drop the new or replacement image into the file upload area or open the file browser to select your image. Naming the new image name the same as the old image automatically replaces the old image with the new one in every article that includes it.
If adding a new image to the article, give the PNG image a descriptive name, such as Adding an SMB Share or Add SMB Share Advanced Settings and save it in the appropriate
Editing an Included File
Some article content comes from a separate include file statement, also referred to as a shortcode.
This statement pulls in content from a different location and allows using common text in multiple website articles simultaneously.
These files are called snippets.
Updating an
For example, the snippet file include file shortcode anywhere in the body of an article.
The example below shows this inside the expand tags.
Clicking Edit Page opens the article markdown file, but only these lines are visible for the included content (the added \ characters prevent rendering the shortcodes in this article):
{{\< expand "Advanced Scheduler" "v" >}}
{{\< include file="/static/includes/AdvancedScheduler.md" >}}
{{\< /expand >}}
(Do not include the escaping backslashes \)
In the above example, the expand and /expand shortcode tags create an expansion/collapse function in the document.
The include shortcode is within the expandable element: {{\< include file="/static/includes/AdvancedScheduler.md" >}}.
(Do not include the escaping backslashes )
The repository
file
Master and Version Branch Differences
TrueNAS documentation uses branches to organize content related to specific software releases and updates, for example, the 24.04 and 23.10 branches of the Documentation Hub.
Content changes in the master branch result in changes to the TrueNAS Nightly Development Documentation content. To make changes in the master branch, fork this branch to create a simple copy of the main repository. Make changes in your forked master as the base for your changes. Do not make changes directly to the TrueNAS master branch of the Documentation Hub repository.
To make content changes in the 24.04 branch, select the 24.04 as the base, then create a fork of that main repository. This ensures approved modifications are added to the TrueNAS 24.04 (Dragonfish) Documentation content.
To make content changes in the 23.10 branch, select the 23.10 as the base, then create a fork of that main repository. This ensures that approved modifications are added to the TrueNAS 23.10 (Cobia) Documentation content.
Fork the Repo
To submit a change or a new article, create a fork (local copy) of the main repository, edit your local copy, and then propose merging your changes back into the main repository.
To start, click the Edit Page link in the top right of the site.
To fork the repo to your GitHub account, click the green Fork this repository button.
Edit the page as needed.
When the changes are complete, add a quick overview of the changes made in the** Description** box, and click the green Commit changes button.
When the page refreshes the changes are complete in your forked repository. Now you can request merging these changes to the main repository using a pull request (PR). Click on Pull Requests.
After the Pull Requests page opens, click the green New Pull Request button.
Confirm that the base repository is set to truenas/documentation and base is set to master or the version branch you are changing (i.e., if you are using 24.04, set that as the base). Set head repository to your forked repository, for example, q5sys/documentation. Set compare to master, or the version branch if proposing changes to either of those branches. Ensure these options are correct, then click the green Create pull request button to create the PR.
Describe your changes and click the green Create pull request button.
That is it! Other contributors review and merge your changes!
As part of the review process, automation builds a preview of the docs site with your changes. When the build completes, a comment appears in the PR that shows the automation result. Click on Show all checks and Details to see a live demo of the site with your changes.
Adding a New Article
Thanks for your interest in submitting documentation articles! This article shows you how to add a new article to the TrueNAS Documentation Hub. All that is required is a GitHub account and your favorite text editor. Taking screenshots for your article is also recommended.
To add an article, construct a bundle that contains your text file and any images, then open a pull request on the repository. There is an Article Template available that can simplify creating your article.
Creating an Article Bundle
Find a place on your local system to create a directory for your article. Name the directory according to the title of your article.
Open the directory and create a new file called
Writing the Article
The first few lines of the
---
title: "Adding a New Article"
weight: 20
---
After setting the front matter, continue writing your article. Raw text is supported, or you can add Markdown syntax. Markdown is designed to be easy to write and read, but also supports directly adding HTML elements. See the Style Guide for syntax help and other suggestions for writing the article. You can generally style the article however you like, but please be aware that other contributors can review the article and change the styling.
Adding Images
If you want to include screenshots of the TrueNAS User Interface with your article, add these files to your article bundle. Be sure to have unique names for each image file.
Uploading the Article Bundle
Open the appropriate repository section for the new content article.
Click Upload files and drag and drop the article bundle directory into the repository. GitHub shows all the files to upload.
Opening a Pull Request
Forking the repository might be needed as part of opening a Pull Request.
Make sure all your files have been uploaded then scroll down to the Commit changes section and write a summary and description of your changes. Select Create a new branch for this commit and start a pull request. and click Propose changes. GitHub can take a few moments to process the files.
Make sure you’re happy with the summary and description of your article, then click Create pull request.
After the pull request is created, the repository automatically builds a preview of the documentation site that has your changes included. The link to this preview is added to the Pull Request after the build completes.
Other contributors will review and merge your article!
Article Template
This template provides general information on constructing and writing TrueNAS tutorial articles. It contains a template example article with front matter, styling, and syntax examples.
Refer to the Style Guide for specific text syntax and formatting examples, Markdown and Hugo website enhancements, and content guidelines to follow.
Application tutorials follow a specific format that covers the installation screens and deployment process. If submitting a tutorial for a community-maintained application article, please see Contributing to Apps and the Community App Tutorial Template at the TrueNAS Apps Market.
Front Matter
Every article needs a front-matter section that contains these parameters:
titlefor the article title.descriptionthat provides a summary of the article content. Keep the description to less than 160 characters. The character count includes spaces between alphanumeric and special characters.weightthat orders the article in the table of contents.
Optional front matter parameters are:
aliaseswhere you include links to articles removed from the website that should be directed to this page.tagswhere you include a single word or a few word flags for the article content. Tags are used internally to pull articles into the Related Articles sections at the bottom of articles and externally for search optimization.
Article Template
Feel free to copy this article template example and rework it when writing your articles for this website.
You can copy the
---
title: "Example Article"
description: "This is a template for any tutorial article on the Documentation Hub website."
weight: 5
---
This is an introductory paragraph for the article.
It should explain the purpose of the procedure, describe what the feature is or can be used to accomplish, and can include links to other websites about the article subject or that support the procedure the article covers.
The introduction typically includes an explanation of why this procedure is beneficial and/or who is the typical audience for this content.
When the procedure is advanced, users might want some references to other sources that have more details or deeper explanations about what the system is doing.
After introducing the material, describe the process to accomplish the task.
Writing in short, declarative sentences that are structured very simply can help readers avoid confusion.
It also makes translations easier!
## Prerequisites
This section can be titled **Prerequisites**, **Before You Begin**, or **First Steps**.
It should cover actions the reader should or must take before they begin the procedure detailed in the article.
Typical first steps might include configuring data storage, adding certificates, and creating user accounts on the TrueNAS system or remote provider if describing a procedure involving a third party.
## How to Do *X*
Begin outlining the procedure steps.
The first step is typically to log in to the system and go to a location like **System > General**.
Including a screenshot is a good way for the reader to confirm they are in the correct location and to get more context.
{{\< trueimage src="/docs/images/SCALE/imagename.png" alt="Image Name Text" id="Image Name Text" >}}
{{\< hint type="danger" >}}
Danger, information, and warnings admonition boxes include information about common errors that are made during the procedure.
These admonitions are best placed before listing out any specific changes to make to the system.
This can help prevent mistakes and educate the reader about common troubleshooting steps.
{{\< /hint >}}
The step procedure should not exceed a maximum of 10 steps in an ordered list.
If the procedure exceeds 10 steps, use sub-steps.
A good practice is to organize the procedure into what to do and how to do it steps.
What steps are the primary list items, and the how to do it are the sub-step items.
Enter screen names and fields on screens in **bold** and a variable value in *italics*.
Be precise with buttons or setting names to avoid confusing the reader.
### Entering Commands
Sometimes a user might need to open a shell to enter a command.
To avoid confusing readers, use either the back backtick or HTML <code> and </code> tags for any command name or string.
If the command string includes a variable, use the HTML <code> and <i> open and close tags to show the string properly formatted.
Do not use all caps for a command or variable, or brackets to enclose a variable.
Some CLI and API command syntax might require the square or curly brackets as part of the string and some commands or command values are case sensitive.
Use inline and multi-line code blocks to define exactly what to type and show an example of the output.
Entering `ifconfig` shows more information about the network interfaces:
```
root@freenas[~]# ifconfig
em0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=98<VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
ether 00:1b:21:7e:70:ca
hwaddr 00:1b:21:7e:70:ca
inet 1.234.56.789 netmask 0xffc11 broadcast 1.234.56.789
nd6 options=1<PERFORMNUD>
media: Ethernet autoselect (1000baseT <full-duplex>)
status: active
```
## Final Steps
Make sure to include any final steps the user can take to confirm they executed the procedure correctly.
Be specific!
Using vague terms can mislead or confuse the reader. Do not assume the reader knows what you are talking about.
Instead, directly state what happens. for example:
"Click *Generate Debug* to compile the system information into a *.tar* file.
A dialog opens to download the file to your local system."
This is a good place to put any troubleshooting tips, in case the user is not seeing the expected result.
If a command or setting should produce a specific result, provide that information.
If the command or setting does not produce the result provide information on what that means and how to correct or resolve the problem.

















