Welcome to FormatForest!

2020-04-19

FormatForest is a simple and elegant blogging engine written in Go. It was originally developed as a personal project targeting Nadim Kobeissi’s personal blog but has now been rendered open source.

FormatForest is only suited for personal blogs operated by a single individual. Its advantages:

Getting Started

Let’s set up a blog using FormatForest.

Step 1: Initializing a Blog

  1. Install FormatForest as a system command: go get -u formatforest.com/cmd/formatforest
  2. Type formatforest init myBlog to create a new FormatForest blog in a folder called myBlog.

The folder myBlog will contain:

Please note that init requires an Internet connection in order to download some very small assets for your blog. If you do not have an Internet connection, you can simply create the above files and folders manually and obtain the same effect, minus the boilerplate HTML templates, CSS and images.

Step 2: Configuring Your Blog

Simply open config.txt using a text editor and modify the values. They are self-explanatory:

Step 3: Write Your First Blog Post

Blog posts are stored in the posts folder and must imperatively have a filename with the following format:

2020-04-19-mypost.md

In the above, we have the date of publication (year-month-day) and then a post tag which indicates a single-word unique identifier for the post which must be between 1 and 32 characters. .md specifies that this is a Markdown file. If your post filename does not meet the above format, FormatForest will not be able to process your blog.

Here is an example post:

{
	PostTitle: "My First Post",
	PostDescription: "A short description of my post for social media embeds.",
	PostImage: "fileNameOfMyImageInResImgFolderForSocialMediaEmbeds.jpg"
}

## Subtitle
Hello, and welcome to my post! Thanks for tuning in!

## Conclusion
Final Fantasy VII Remake is a fantastic game!

In FormatForest, the first five lines of a post specify a configuration for that post itself. This must be specified in order for the post to be processed correctly. The rest of the file can be standard Markdown.

Step 4: Publish Your Blog

In order to generate the static HTML for your blog, return to your myBlog folder and type: formatforest format. Your website will then be ready inside the public folder.

You may then either:

Easy!

Customizing Your Blog with Templates

The templates folder contains three templates:

These templates can be fully customized to your liking. The CSS file can be found and modified inside res/css/style.css.

Template Tags

FormatForest will find the following template tags inside HTML templates and replace them automatically with the appropriate content. Each tag is written in the HTML file in the format {{FF:TagName:FF}}. For example, the PostDate tag would be written as {{FF:PostDate:FF}}.

Post Tags

RSS Tags

Miscellaneous Tags

Discussion

Please check out the FormatForest source code repository to discuss and contribute.

License

FormatForest is authored by Nadim Kobeissi. It is provided as free and open source software, licensed under the GNU General Public License, version 3.

© Copyright 2020-2021 Nadim Kobeissi. All Rights Reserved.