How to add an article

Articles are grouped into pods (topics). To add an article, run the following CLI command:

gerbil create mytopic

This will create a directory called mytopic under the pods directory, as well as some additional files:

jason@mint:~/projects/mysite$ gerbil create mytopic
INFO Creating pod meta file: /home/jason/projects/mysite/site/pods/mytopic/meta.json
INFO Creating content in dir: /home/jason/projects/mysite/site/pods/mytopic/content/9wi969rj
INFO Creating content static dir: /home/jason/projects/mysite/site/pods/mytopic/content/9wi969rj/static
INFO Creating meta file: /home/jason/projects/mysite/site/pods/mytopic/content/9wi969rj/meta.json
INFO Creating content markdown file: /home/jason/projects/mysite/site/pods/mytopic/content/9wi969rj/content.md

What are these files for?

The "content ID" that was automatically created is 9wi969rj. A content ID is created for a couple of reasons:

  1. To ensure uniqueness in identifying an article
  2. To help navigate to an article, even the article title and "slug" change.

Editing the markdown

We can use a text editor to edit the markdown file that was created. The markdown format expected by Gerbil is CommonMark.

Please see this example Gerbil markdown document. There is a link to the markdown source, so you can see how to add elements like images.

Once you have edited the markdown file to your satisfaction, you can build the site.

Next: Building the site

Comments

Leave a comment

What color are brown eyes? (spam prevention)
Submit