blogo

command module
v0.0.0-...-06e1b3c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

README

a blog/website builder in Go

Blogo processes Markdown files in a directory, and makes HTML files.

Installation

You need Go installed [properly][http://golang.org/doc/install]. Then run

go get http://bitbucket.org/bjjb/blogo

Usage

Then just run blogo in your blogo directory.

Rationale

I wrote this because I wanted to learn to program in Go, and DIY blog engines are how one learns a language these days.

Documentation

...is in blogo.go, so you can view it with godoc. For usage instructions, try blogo -h or blogo help.

License

The code is available under the same license as Go.

TODO

  • Put posts in their own directories (with an index.html), but make this behaviour selectable.

Documentation

Overview

Command-line executable for blogo

Works in the directory given on the command-line, or the current working directory. Looks for .json files, and for each one found, builds a Post. Post values which are absent from a post's .json file will be filled in using values from index.json, the blog's configuration. Finally, index.json will be rendered using the blog, and pages for every month creating posts will be created, and a page for every tag.

A post's body (and summary) is written in Markdown. By default, this is obtained by reading a file with the same slug as the .json config, with a .md extension. This is also a mustache template, through for which the post is the view.

The template used for posts is _post.html, for tags: _tag.html, and for months, _month.html. All posts and pages are sent through _layout.html. These are all Mustache templates.

By default, generated HTML files will be placed in the same directory. You can override this with the "output" value in the index.json.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL