Creating the first website
In this guide, we will use Dimer to publish Markdown files to a fully functional documentation website.
Table of contents
Before getting started, make sure
- You have a Dimer account or create one.
- You are familiar with command line. We will be using
Dimer CLIto publish documentation.
- Download Dimer CLI for your platform.
Creating a new project
Once you have the CLI installed for your operating system, you are ready to publish your first documentation website with Dimer.
dimer --version to make sure you are running version
1.0.6 or higher.
- Create new project
- Directory structure
mkdir my-app-docs cd my-app-docs dimer init
├── dimer.json └── docs └── master └── index.md
dimer initcommand will prompt you to choose a subdomain, you can feel free to skip it. However, a subdomain is required to publish your documentation.
Also, it will create a dummy document inside
docs/masterdirectory. You can configure directory structure or even change subdomain using the
The docs are published using
dimer publish command. Below is the list of actions occurred when you run this command.
- Authenticate your account details.
- Create a website for you using the subdomain.
- Sync all versions defined inside the
- Bundle all markdown files and publish them to the website.
Also, the dimer compiler will show you errors when it is unable to compile a markdown document successfully. Documents with error(s) are never published.
Dimer works on sane defaults. Which means, it will get your document in good shape, even when most of the details are missing. However, in few cases, getting defaults is impossible.
In the following screenshot. The compiler returned an error since the
title for the document is missing.
We can fix this by defining a title as
H1 or by setting it inside YAML front matter.
--- title: Document title --- This is a sample markdown document to get you started with Dimer. Each document always contains a `title`, which can be in the form of `h1` or defined inside YAML front matter.
# Document title This is a sample markdown document to get you started with Dimer. Each document always contains a `title`, which can be in the form of `h1` or defined inside YAML front matter.
The warnings are raised, when compiler thinks your document can be improved. Documents with the warning(s) are published online.
In the following screenshot, a warning is raised, since we forgot to close the
The art of publishing great documentation lies in how well you format your markdown files. Following guides will help you in mastering same.