Pureblog is the most simple markdown blog you could possibly get. Written in Go using gin-gonic and golang-commonmark.
The install process requires for you to have Go; get it from here.
Clone or download the repository from here, then extract it. Open a terminal window (macOS/GNU Linux) or a command prompt (Windows) in pureblog's directory. Follow by running the following command:
go get . && go build .
This will compile the program into a single executable. You can run this; use the ls
command to view the name of it. It should be something along the lines of pureblog
(macOS/GNU Linux) or pureblog.exe
(Windows). Simply use ./pureblog
, assuming that it's called that.
If you'd rather run it instantly without creating an executable, use the following:
go get . && go run .
Now that you have pureblog installed, you can configure it. The following directories and files can be safely changed.
Inside the folder you downloaded, you'll notice that there's a styles
directory. This is where all of the CSS and HTML templates are kept. The comments at the start of the HTML files should help.
.env
- the file in the repository's root directory - includes configurable values.
This variable is self-explanatory; it's the port on which portblog's HTTP server will listen. For example, if it's set to 8080
, the blog would be accessable by opening http://localhost:8080
.
Default:
80
This variable decides on whether or not posts will be cached. This provides quite a large performance improvement if you're working with large files.
Note: By default, pureblog caches everything, including the CSS, etc. If you want your site to update instantly without requiring a restart, change the CACHE
value in .env
to FALSE
.
Default:
TRUE
If you've already compiled pureblog (as shown in the "Installation" chapter), running it is as simple as executing the generated file. You can test if the blog's working by visiting here, assuming that the PORT
variable in .env
is set to 80
.