Build fast and lightweight blogs using markdown.
- Fast
- Minimalist
- RSS feed
- Easy to setup
- Highlighted code blocks
Go 1.16+:
go install github.com/rramiachraf/static@latest
Create a directory to host your blog posts, and in there create a config.yml
with the following fields:
title: blog title
description: blog description
url: example.com #must be provided if you want RSS
You can then start writing your blog posts by creating new files ending with .md
.
A blog post file contains 2 areas seperated with an empty line, metadata and the post content.
TITLE Your blog post title
DATE 07/03/2022 21:40
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex:
- Duis
- Excepteur sint occaecat
- Culpa qui officia deserunt mollit
- You must specify a date with the format
DD/MM/YYYY HH:MM
orstatic
won't be able to parse it. - You can name your post files anything, just make sure they end with
.md
. - static will generate a slug from the title you provide in the title.
After following all the necessary steps, you could simply just run static
, static will go through the files and generate the ./dist
folder with all the necessary files to host your blog.
-config string
config file path (default "config.yml")
-out string
directory path where the generated files will be saved (default "dist")
So, you can do something like: static -config /my-custom-path/my-conf.yml -out /somewhere
.