Going to the World Wide Web

Home

Day 2

Made this little blog page for December Adventure, and hopefully other projects in the future. I didn't want to bother writing a static site generator so I googled for something I could get running with just bash, and found zodiac! It uses awk and sh to parse out markdown files and render html pages using templates.

Actually figuring out how to use zodiac wasn't the hard part, but trying to remember enough CSS to get some basic styling going took me a little bit too long. Being able to write awk functions that get run when a page is being parsed is a very handy feature also, so I'll see if I can do fun stuff with this in the future.

Regardless, it's markdown support is good enough to include images...

9front running on my emachines laptop next to a 24in monitor

... and code...

MAKEFILE_ROOT := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
ZODIAC_ROOT := $(MAKEFILE_ROOT)/zodiac
SITE := $(MAKEFILE_ROOT)/site
COMPILED = $(MAKEFILE_ROOT)/www
ZOD_LIB = $(MAKEFILE_ROOT)/usr
ZODIAC_BIN := $(ZOD_LIB)/bin
ZOD := $(ZODIAC_BIN)/zod
PATH:=$(PATH):$(ZODIAC_BIN)
SHELL := env PATH=$(PATH) /bin/sh
all: $(ZODIAC_BIN)/zod
mkdir -p $(COMPILED)
$(ZOD) $(SITE) $(COMPILED)
$(ZODIAC_BIN)/zod:
mkdir -p $(ZOD_LIB)
make -C $(ZODIAC_ROOT) PREFIX=$(ZOD_LIB) install
chmod +x $(ZODIAC_ROOT)/bin
sync: all
rsync -avP -e ssh ${COMPILED} ${SSH_TARGET}
clean:
rm -rf $(COMPILED)
rm -rf $(ZOD_LIB)
.PHONY: clean sync all

*(well kinda I still need to work on that)*

... it works for me.