Skip to content

A static blog website generator written in makefile with various tools.

License

Notifications You must be signed in to change notification settings

neovoe/makefile-blog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Makefile-Blog

Makefile-Blog is a static blog website generator written in makefile with various tools. The makefile blog creates index, post index and rss files from the blog posts you wrote.

Requirements

Makefile-Blog requires following packages for generating static files:

  • coreutils - (tr, ls, cut, basename, stat, echo, cat)
  • bash
  • sed
  • gettext - (envsubst)
  • make

Blogging

Running Makefile-Blog first requires you to create posts directory. After creating the posts directory, anything you put under it without an extension is a blog file. Spaces are not used, instead underscores are used which are later replaced.

$ make setup
$ echo 'Hello World' > posts/My_First_Post
$ make

Also, building individual pages is parallelization compatible. So running with make -j8 is possible.

Configuration

Variables in the makefile can be either manually modified or given through environment such as make BLOGNAME='My First Blog'. Some fields you may want to change as following:

BLOGNAME = My First Blog
BLOGDESC = hey
TEMPLATE = default
BLOGROOT = 
# You may set blogroot your domain for non relative urls.
# Also dont put / at the end

Any time you change the makefile itself or the configuration through variables, you may need to run make clean before you make again because makefile itself and the environment variables aren't watched for modifications.

Templating

Do you want a custom template? Great!

Makefile Blog supports custom templates. All you need to do is satisfy files under default template and put your own custom template under templates. Don't forget to change TEMPLATE variable from the makefile. Also setting BLOGROOT to your absolute build directory might be helpful when testing locally.

The template files use environment variables set by makefile during the building process similar to ${TEMPLATE_POST_DATE_UPDATED} or ${TEMPLATE_POST_AUTHOR} to show content.

Contributing

Contributions and ideas are welcomed.

Live Demo

A live demo with default template can be found at here.

About

A static blog website generator written in makefile with various tools.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 53.2%
  • Makefile 46.8%