Getting started

An introduction.

Cactus templates are set up using the Django Template Language. Django’s template language is both powerful and easy to use. A template is simply a HTML file. Let's take a look at how to use the blog template.

General file structure

The pages folder contains the index and the archive template, along with the posts folder. The posts folder is where each of your individual posts are located. CSS, Javascript and image files are located within the static folder. The templates folder contains the base and post template.

What do these files represent?

The base.html file is your HTML skeleton document. We can consider it the parent template, and all others child templates. The index.html file defines the content of your home page. The post.html file is the skeleton of each post. It defines the structure of each post, but not the content within.

The content of each post is set within each individual post file. Within this file you can set the posts metadata, such as its title, author, date and headline. The archive.html file contains an overview of all of your posts, arranged by month. We can format blog posts using the Markdown Syntax. To get a good impression of how Markdown works, have a look at the .html files of the default blog posts.

Basic customization

To define the title of your blog, head into the base.html and find the title block. You'll also want to change the footer information in this file. You can replace the avatar.jpg image (located in /static/images) with your own. To get started on your first blog post, it might be best to use one of the default posts as your starting point.

Happy writing!

Posted on Nov 25
Written by Benjamin den Boer