gaurang.dev

bootstrapping

2023-05-28

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:

Who is this for?

Mostly me, but feel free to give it a try especially if you like using standard unix tools to get the job done and have a basic grasp of html & css.

all posts =>