There are so many tools and systems to build static sites, each with its own set of dependencies, rules and requirements.
Why I started m4ke
My main goal was to create a tool for building static blogs that was easy for me to use. I wanted to cut down on the number of steps and the need for extra tooling, makingπ it straightforward for me to get my blog up and running without any hassle.How m4ke works
At its core, m4ke uses a simple concept: it takes text files, processes them, and turns them into a website. It doesn't have any dependencies or frameworks. All you need is a text editor and a shell to run make.
ββββββββββββββ
ββββββββββββ ββββββ ββ΄βββββββββββββ
β β β β β ββ
β Makefile βββΊβ m4 βββΊβPosts (html)ββ
β β β β β ββ
ββββββββββββ βββ²βββ ββββββββββββββ
β
βββββββββ΄βββ
ββ€Posts (m4)β
ββββββββββββ¬β
ββββββββββββ
Makefile
GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.
m4 macro processor
GNU M4 is a macro processor in the sense that it copies its input to the output expanding macros as it goes. Macros are either builtin or user-defined and can take any number of arguments.
We essentially convert the input files into html files, make is designed for this since it essentially converts source into intermediate or binary representations.
Program flow can be described in these steps:
- For all files ending in .m4
- Run the file through m4 macro processor to generate html files