30 April 2021

For my blog I prefer to generate a static contents (HTML, Javascripts, ...) instead of dynamic pages because I update not so
frequently and my pages are very simple.

Among all static contents generator I choose to use (JBake)[https://jbake.org/], I found it very simple to use and very well documented and I like the default template :) .

I created a simple Makefile to help me to create and run locally Jbake:

# Used to set up languages in date, like 1 April 2021
export JBAKE_OPTS="-Duser.language=en"

# Rule used to clean previous generated file, prod-site is a folder where I store my final files
clean:
	rm -fR ../prod-site/blog ../prod-site/css ../prod-site/fonts  ../prod-site/js

# Rule used to clean up and create static content
build: clean
	jbake -b . ../prod-site

# Rule used to create static content & startup a server @ http://localhost:8820 & watch for changes on files
up:
	rm -fR output && jbake -b -s

References