Lilac Blog Generator

Lilac is a simple python based static blog generator. Lilac converts markdown posts into HTML markup.

Deploying Lilac

1. Create the virtual enviroment:

mkdir /var/virtualenvs/lilac
virtualenv2 /var/virtualenvs/lilac

2. Activate the enviroment and install lilac

source /var/virtualenvs/lilac/bin/activate
pip install lilac

Makefile

This goes in /srv/http/archwomen.org/blog/lilac

Makefile
# Makefile to manage blog
 
help:
	@echo "Help message:"
	@echo "  help   -  show this help message"
	@echo "  serve  -  start a web sever and watch to auto rebuild"
	@echo "  build  -  to build markdown to html"
	@echo "  clean  -  to remove htmls built by lilac"
 
build:
	lilac build
 
serve:
	lilac serve --watch
 
clean:
	cp -r archwomen post page tag 404.html about.html archives.html feed.atom index.html tags.html /srv/http/archwomen.org/blog/public && rm -rf post page tag 404.html about.html archives.html feed.atom index.html tags.html

Arch Women Customizations

Post format

Posts are written in markdown and have the following format:

author: "name"
title: "Test Blog Post"
date: "YYYY-MM-DD HH:MM"
excerpt: "this is a post summary"
tags = ["tag1", "tag2"]
----------
 
post body in markdown

Generating the Blog

Change to the Lilac directory:

cd /srv/http/archwomen.org/blog/lilac

Activate the virtual environment:

source /var/virtualenvs/lilac/bin/activate

Build the HTML files for the site:

make build

Deploy files and clean the directory:

make clean

Deactivate the virtual environment:

deactivate

To Do


aw-tech/lilac.txt · Last modified: 2015/10/19 00:07 by fsckd