influence by the medium of text, a regular thought accelerator but they scorn at the thought of using a monolothic CMS just to get their ideas to the world.

caddy banner image

In comes their secret weapon: Caddy.

Caddy is an open source web server written in GO. The main feature of interest here is 'directives', a low level plugin system supported by many third party developers. are followers of the markdown race, they enjoy many different flavours from Github to Ghost so what better choice is there for marking up their ideas?


Form follows function, Content before code (or something along those lines) keep it simple they like to say. In comes, with an inoffensive name this might not stand out from the crowd but with some minor adaptations marked have a theme that their readers love.

image of blog

Caddy has a set of predefined template tags from the go standard library text/template these allow us to insert useful information like a readers IP address, the current date, or a rendered markdown file.

<!-- insert the rendered markdown here -->

Getting more advanced, this allows us to create a contents page, linking to all of our posts --

{{range .Files}}
    {{if ne .Name ""}}
        <a href="{{$.StripExt .Name}}">
            <h3>{{$.StripExt .Name}}</h3>

Loop through each .md file -> ignore our index page -> strip out the .md extension -> link to the post.

Cool huh? We're just getting started.

The Caddyfile

A good Caddyfile is the backbone of any self respecting blog. They describe the directives we want to use, which files we want to serve, the domain we want our users to visit and much more. A basic Caddyfile looks something like this --

Yes that is a little contrived, marked have a slightly more complicated use case --


# clean up our urls
ext .md

# logs help us with debugging later
errors logs/error.log
log logs/access.log

# serve our md files, using custom templates
markdown /blog {
        template /templates/post.html
        template index /templates/index.html

The Index

There's one undocumented oddity in Caddy's markdown directive, the post.

Index is considered a special post, it can be reached by visiting the root url of the blog, in our case Alongside a custom template file that removes our '- return to home -' link, we're all wrapped up.

image of index page

So now can get back to disrupting technology as we know it, and you can get back to tanning behind your laptop screen at 3am.

Checkout the project at

Checkout the source at github/

Checkout this post (meta) at