Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Go Blog Go!

A go version of my stupid blog script

This is billo's crappy blog publishing platform


  1. write Markdown files with a .txt extension.
  2. Arrange them in a directory structure YYYY/MM
  3. create a CSS file header and footer shtml files
  4. enable apache server side includes to parse .shtml files
  5. run this script

I've updated the program to use a Go implementation of Markdown (blackfriday). Forking and execing Perl, a complete repub of myown blog of about 500 articles took about 15 seconds. With the native implementation it takes 0.12 seconds. Yay.

Directories needed:

blogdir: this is where the .txt (Markdown) files should live masterdir: this is where some static boilerplate include files are

Files needed in blogdir. These are not altered by the script:

index.shtml: this is not touched by the update script.
header.shtml: when the script creates pages, this is the top chunk
footer.shtml: when the script creates pages, this is the bottom chunk
footerbar.shtml: visible contents of the footer on all pages
monthheader.shtml: for the generated monthly index, this file is the top chunk
monthfooter.shtml: for the generated monthly index, this file is the bottom chunk
feed/index.shtml: the shell of the RSS feed

Files needed in masterdir:

monthindex.shtml: This is the master template for each generated index.shtml in the month folders
tweet.shtml: this includes the "tweet" button which is placed at the top of the archive index.

files generated by this script:

blogdir/sidebar.shtml - this is the top level index of all the months where there is a post
blogdir/contents.shtml = top level meat middle section of the main index file
blogdir/feed/items.ihtml - the RSS feed items
blogdir/YYYY/MM/contents.shtml - the contents of each month index page
blogdir/YYYY/MM/index.shtml - the index page of each month


A go version of my stupid blog script






No releases published


No packages published