DigitalOcean's Technical Writing Guidelines
DigitalOcean is excited to continue building out its collection of technical articles related to server administration and software engineering. To ensure that DigitalOcean articles have consistent quality and style, we have developed the following guidelines.
There are three sections in this guide:
- Style, our high-level approach to writing technical tutorials
- Structure, an explanation of our layout and content
- Formatting and Terminology, a Markdown and terminology reference
Our templates are useful as a starting point for an article, and we encourage you to start your draft with this template.
We also have a technical best practices guide which outlines our tech-focused recommendations.
Read on to learn about our article style.
DigitalOcean articles don’t use a particular style manual like the Chicago Manual of Style. Instead, we strive to ensure all DigitalOcean tutorials are:
- Comprehensive and written for all experience levels
- Technically detailed and correct
- Practical, useful, and self-contained
- Friendly but formal
These principles guide authors to create articles, tutorials, and other learning materials that help people solve their problems and grow as developers.
Comprehensive and written for all experience levels
Our articles are written to be as clear and detailed as possible without making assumptions about the reader’s background knowledge.
We explicitly include every command a reader needs to go from their first SSH connection on a brand new server to the final, working setup. We also provide readers with all of the explanations and background information they need to understand the tutorial. The goal is for our readers to learn the concepts, not just copy and paste code and commands.
We avoid words like “simple,” "straightforward,” "easy,” “simply,” “obviously,” and “just,” as these words do make assumptions about the reader’s knowledge. While authors use these words to encourage and motivate readers to push through challenging topics, they often have the opposite effect; a reader who hears that something is “easy” may be frustrated when they encounter an issue. Instead, we encourage our readers by providing the explanations they need to be successful.
Technically detailed and correct
Our articles are technically accurate and follow industry best-practices. They also provide more details than just the code and commands. We don’t provide large blocks of configuration or program code and ask readers to paste it into their text editor, trusting us that it works. We provide all the details necessary for the readers to understand it.
Every command should have a detailed explanation, including options and flags as necessary. Every block of code should describe what it does and why it works that way. When you ask the reader to execute a command or modify a configuration file, first explain what it does and why you’re asking the reader to make those changes. These details give readers the background they need to grow their skills.
Authors test their tutorials to ensure they work by following them exactly as written on fresh servers. This ensures accuracy and identifies missing steps. Our editors also test these articles as part of the review process to ensure a great learning experience for the reader.
Practical, useful, and self-contained
Once a reader has finished a DigitalOcean article, they should have installed, built, or set up something from start to finish. We emphasize a practical approach: at the end of an article, the reader should have a usable environment or an example to build upon.
What this means for the writer is that their article should cover the topic thoroughly. Authors should link to existing DigitalOcean articles, if available, to set up prerequisites that readers should follow before beginning the tutorial, and link to available DigitalOcean articles to provide additional information in the body of the tutorial. Authors should only send readers offsite to gather information if there’s no existing DigitalOcean article and the information can’t easily be added to the article directly.
Friendly but formal
Our tutorials aim for a friendly but formal tone. This means that articles do not include jargon, memes, or excessive jokes. As we’re writing for a global audience, we aim for a tone that works across language and cultural boundaries.
This also means that, unlike blog posts, we do not use the first person singular (e.g. “I think …”). Instead, we encourage the use the second person (e.g. “You will configure …”) to keep the focus on the reader and what they’ll accomplish. In some cases, we’ll use the first person plural (e.g. “We will install …”“).
We encourage motivational language focused on outcomes. For example, instead of "You will learn how to install Apache”, try “In this tutorial you will install Apache”. This motivates the reader and focuses on the goal they need to accomplish.
DigitalOcean articles have a consistent structure comprised of the following sections:
- Goals (Optional)
- Step 1 — Doing the First Thing
- Step 2 — Doing the Next Thing
- Step n — Doing the Last Thing
Our article templates have this structure already written for you in Markdown, and we encourage you to use this template as a starting point for your own articles.
A typical title follows this format: How To <Accomplish a Task> with <Software> on <Distro>.
When you write your title, think carefully about what the reader will accomplish by following your tutorial. Try to include the goal of the tutorial in the title, not just the tool(s) the reader will use to accomplish that goal.
For example, if your tutorial is about installing the Caddy web server, the goal is likely to host a website. If your tutorial is about installing FreeIPA, the goal might be to set up centralized Linux authentication. Titles that include the goal (like “How To Create a Status Page with Cachet on Debian 8”) are generally more informative for the reader than titles that don’t (like “How To Install and Set Up Cachet on Debian 8”).
The first section of every article is the Introduction, which is usually one to three paragraphs long. The purpose of the introduction is to motivate the reader, set expectations, and summarize what the reader will do in the article. Your introduction should answer the following questions:
- What is the tutorial about? What software is involved, and what does each component do (briefly)?
- Why should the reader learn this topic? What are the benefits of using this particular software in this configuration? What are some practical reasons why the reader should follow this tutorial?
- What will the reader do or create in this tutorial? Are they setting up a server and then testing it? Are they building an app and deploying it? Be specific, as this provides the motivation readers need and gets them excited about the topic.
- What will the reader have accomplished when they’re done? What new skills will they have? What will they be able to do that they couldn’t do before?
Answering these questions in your introduction will also help you design a clear and reader-focused tutorial, as you’ll align the steps
Keep the focus on the reader and what they will accomplish. Instead of using phrases like “we will learn how to”, use phrases like “you will configure” or “you will build”. This goes a long way to motivate the reader and get them excited about your topic.
Some larger tutorials use the optional Goals section to separate the tutorial’s context, background explanation, and motivation from the details of the final configuration. You should only use this section if your tutorial requires multiple servers, has a large software stack, or otherwise has a particularly complicated purpose, method, or result.
Most tutorials will not have a Goals section.
The Prerequisites sections of DigitalOcean articles have a very specific format and purpose.
The purpose is to spell out exactly what the reader should have or do before they follow the current tutorial. The format is a bulleted list that the reader can use as a checklist. Each bullet point must link to an existing DigitalOcean tutorial that covers the necessary content if one exists. This allows you to rely on existing content known to work instead of starting from scratch.
Common prerequisite bullet points include:
- The number of servers necessary, including distribution, initial server setup, and any additional necessary options (like memory requirements, DO API keys, IPv6, or private networking).
- Software installation and configuration.
- Required DNS settings or SSL certificates.
- Additional user accounts like GitHub, Facebook, Twitter, or other services your reader will need.
Our systems and DevOps tutorials take the reader from a fresh deployment of a vanilla distribution image to a working setup, so they should start with the first SSH connection to the server or include a prerequisite tutorial that does.
Our software development tutorials work in a similar fashion, providing the reader with all of the prerequisites they’ll need up front, including a prerequisite for the development environment.
For example, a tutorial about building and deploying a Node.js application and deploying it to an Ubuntu server using Git might have the following prerequisites:
To complete this tutorial, you will need:
- One Ubuntu 18.04 server set up by following the Ubuntu 18.04 initial server setup guide, including a non-root
sudo-enabled user and a firewall.
- A domain name configured to point to your server. You can learn how to point domains to DigitalOcean Droplets by following the How To Set Up a Host Name with DigitalOcean tutorial.
- Git installed on your local machine. You can follow the tutorial Contributing to Open Source: Getting Started with Git to install and set up Git on your computer.
- A local development environment for Node.js. Follow How to Install Node.js and Create a Local Development Environment.
By reading the prerequisites, your reader knows exactly what they need to do before they start. There are no surprises.
When you test your tutorial, make sure you follow all of the prerequisite tutorials exactly as written, so that everyone uses the same starting point. If you changed a variable or completed an optional step from one of the prerequisites, make sure to note that.
You can see good prerequisites examples for:
Ubuntu 16.04 servers, software installation, and DNS records in this Minio tutorial’s prerequisites.
CentOS 7 servers and DNS records in this FreeIPA tutorial’s prerequisites.
Debian 8 servers with memory requirements and software setup using partial steps from other tutorials in this Cachet tutorial’s prerequisites.
Handling multiple servers with software installation in this Nagios and Alerta tutorial’s prerequisites.
The Step sections are the parts of your tutorial where you describe what the reader needs to do. A step contains commands, code listings, and files, and provides explanations that not only explain what to do but also why your’re doing it this way.
Each step begins with a level 2 heading and use the gerund, which are -ing words.
Procedural tutorials should start each step title with the word Step and a number, followed by an em-dash:
Step 1 – Creating User Accounts
After the title, add an introductory sentence that describes what the reader will do in each step and what role it plays in achieving the overall goal of the tutorial. Focus on the reader. Instead of phrases like “We will learn” or “I will explain”, use phrases like “You will build” or “you will create”.
End each step with a transition sentence that describes what the reader accomplished and where they are going next. Avoid repeating the step title in these introductions and transitions, and don’t start or end steps with contextless instructions, commands, or output.
Commands and Code in Steps
All commands in a step should be on their own line in their own code block, and each command should be preceded by a description that explains what the command does. After the command, provide additional details about the command, such as what the arguments do and why your reader is using them.
Execute the following command to display the contents of the
/home/sammydirectory, including all hidden files:
- ls -al /home/sammy
-aswitch shows all files, including hidden ones, and the
-lswitch shows a long listing including timestamps and file sizes.
Similarly, always introduce a file or script by describing its general purpose, then explain any changes that the reader will be making in the file. Without these explanations, readers won’t be able to customize, update, or troubleshoot their server in the long run.
Explicitly tell the user to create or open each file using a command on its own line.
Open the file
/etc/hginx/configin your editor:
- nano /etc/nginx/config
If you’re asking the reader to write code, follow the same approach for commands: introduce the code block with a high-level explanation of what it does. Then show the code, and then call out any important details:
Create the file
hello.jsin your text editor:
- nano hello.js
Add the following code to the file which prints a message to the screen:hello.js
console.log("Hello world!"); console.log("this is my first Node.js program!")
console.logfunction takes a string and prints it to the screen on its own line.
Display the output of commands and programs using a code block as well, like the following example:
- node hello.js
You’ll see the following output:
OutputHello world! This is my first Node.js program!
DigitalOcean’s custom Markdown and formatting guidelines are designed to help make our tutorials’ instructions as easy to read as possible. This Docker Swarm tutorial is a good example of how to use our custom Markdown to distinguish between commands run on several different servers, as well as locally.
The Conclusion of your tutorial should summarize what the reader has accomplished by following your tutorial. Instead of using phrases like “we learned how to”, use phrases like “you configured” or “you built”.
The conclusion should also describe what the reader can do next. This can include a description of use cases or features the reader can explore, links to other DigitalOcean tutorials with additional setup or configuration, and external documentation.
DigitalOcean tutorials are formatted in the Markdown markup language. Daring Fireball publishes a comprehensive Markdown guide if you’re unfamiliar with it. DigitalOcean also uses some custom Markdown. Examples of our custom Markdown are in the appropriate sections below.
Each section of our tutorials has a corresponding header: the title should be an H1 header; the introduction should be an H3 header; the goals, prerequisites, steps, and conclusion should have H2 headers. You can see this format in our Markdown article templates.
For procedural tutorials, step headers should include step numbers (numerical) followed by an em dash (—).
Step headers should also use the gerund, which are -ing words. An example step header is Step 1 — Installing Nginx.
Use H3 headers sparingly, and avoid H4 headers. If you need to use subheaders, make sure there are two or more headers of that level within that section of the tutorial. Alternatively, consider making multiple steps instead.
Bold text should be used for:
- Visible GUI text
- Hostnames and usernames, like wordpress-1 or sammy
- Term lists
- Emphasis when changing context for a command, like switching to a new server or user
Italics should only be used when introducing technical terms. For example, the Nginx server will be our load balancer.
In-line code formatting should be used for:
- Command names, like
- Package names, like
- Optional commands
- File names and paths, like
- Example URLs, like
- Ports, like
- Key presses, which should be in ALL CAPS and use a plus symbol, +, if keys need to be pressed simultaneously, like
Code blocks should be used for:
- Commands the reader needs to execute to complete the tutorial
- Files and scripts
- Terminal output
- Interactive dialogues that are in text
Excerpts and omissions in files can be indicated with ellipses (…). If most of a file can be left with the default settings, it’s usually better to show just the section that needs to be changed.
Code Block Prefixes
Do not include the command prompt in the code block. Instead, use DigitalOcean’s custom Markdown for non-root user commands, root user commands, and custom prefixes, respectively:
```command sudo apt-get update ``` ```super_user adduser sammy ``` ```custom_prefix(mysql>) FLUSH PRIVILEGES; ```
This is how the preceding examples look when rendered:
- sudo apt-get update
- adduser sammy
- FLUSH PRIVILEGES;
Code Block Labels
DigitalOcean’s Markdown also includes labels and secondary labels. You can add labels to code blocks by adding a line with
[label Label text] or
[secondary_label Secondary label text] anywhere in the block.
Use labels to mark code blocks containing the contents of a file with a filename. Use secondary labels to mark terminal output.
Labels look like this when rendered:
This is one line of the file This is another line of the file . . . This is a line further down the file
Secondary label example:
This is the secondary label textThis is some output from a command
Code Block Environment Colors
DigitalOcean’s Markdown allows you to color the background of a code block by adding a line with
[environment name] anywhere in the block. The options for
This is a local server command example:
- ssh root@your_server_ip
These are non-primary server command examples, useful for multi-server setups:
- echo "Secondary server"
- echo "Third server"
- echo "Fourth server"
- echo "Fifth server
Notes and Warnings
The DigitalOcean Markdown parser allows for custom note and warning code blocks to be used to display very important text.
Here’s a Markdown example of a note and a warning (this is an image):
Here’s the rendered result:
Note: This is a note.
Warning: This is a warning.
Highlight any items that need to be changed by the reader, like example URLs or modified lines in configuration files. You can do this by surrounding the word or line with our custom <^> Markdown. Note that you cannot highlight multiple lines with one pair of symbols, so you need to highlight each line individually.
If you reference a variable in a context where you would normally also use
in-line code formatting, you should use
both styles. Make sure your tutorial is as accessible as possible by using language like “highlighted in the preceding code block” instead of “highlighted in red above”.
Avoid language like “highlighted in red below”
Images and Other Assets
Images can quickly illustrate a point or provide additional clarification in a step. Use images for screenshots of GUIs, interactive dialogue, and diagrams of server setups. Don’t use images for screenshots of code, configuration files, output, or anything that can be copied and pasted into the article.
If you’re including images in your tutorial, please follow these guidelines:
- Include descriptive alt text so readers using a screen reader can rely on the alt text rather than the image.
- Use the
- Host images on imgur
- Make the image with as short a height as possible
If you make a mockup of a diagram for your tutorial, we will create a diagram in the DigitalOcean style. We’ll also upload all images to DigitalOcean servers at publication time.
Here’s a Markdown example for including images in your tutorial:
![Alt text for screen readers](http://imgur.com/your_image_url)
Occasionally, you will want the reader to have access to a configuration file that is too long to display in the main body of the tutorial. DigitalOcean will host this file on our assets server. You can use standard link formatting to link to the file.
Users, Hostnames, and Domains
Our default example username is sammy. You can also choose something descriptive where helpful, like webdav-kai or nsd.
your_server is the default hostname, though you are encouraged to choose something descriptive, especially in multi-server setups, like django_replica_1.
your_domain is the default domain. For multi-server setups, you can choose something like primary-1.your_domain or replica-1.your_domain. While example.com is a valid domain for documentation, using your_domain in tutorials makes it more clear that the reader should change the domain in examples.
Use highlighting when using these in configuration files, like this:
ip: your_server_ip domain: primary-1.your_domain
This makes it clear to readers that there’s something they should change.
IP Addresses and URLs
your_server_ip, with in-line code formatting and variable highlighting, is the default way to show an IP address. You can show multiple IP addresses with names like
replica_private_ip. If you need to illustrate more realistic IP addresses, use an address in the one of the two blocks reserved for documentation as per RFC-5737. Specifically, we recommend
203.0.113.0/24 for example public addresses and
198.51.100.0/24 for example private addresses.
Example URLs that contain a variable the reader needs to customize should use code formatting with the variable highlighted. We default to using
http://your_server_ip/. However, live links should instead use the standard Markdown link style with no extra formatting.
Use the official website’s capitalization of the name of their software. If the product website is not consistent with their capitalization, just be consistent within a single article.
Link to the software’s home page when you first mention the software.
For technical clarity, use the project’s terminology for multi-server setups. Please be clear that the terms are coming from the project. For example: “The Django project refers to the original server as the primary and the secondary server as the replica. The MySQL project refers to the original server as the master and the secondary server as the slave.”
When discussing multi-server architectures more abstractly, use the terms primary and replica or manager and worker.
Technical Best Practices
Our technical best practices guide guide contains more guidance that will help you create consistent, quality tutorials that help our readers.
Follow this link to become a DigitalOcean author.