See github.com/compromyse/compromyse.xyz for an example site.
# REQUIREMENTS: CMake, Git, GCC/Clang, GNUMake/Ninja
$ git clone https://github.com/compromyse/msg
$ mkdir build && cd build
$ cmake ..
$ make # or ninja
$ ./msg -h
msg: The Minimal Static Site Generator
Usage: ./msg [-h] [-w] [-v] [-o <output>] <directory>
-h : Help
-w : Watch working directory for changes
-v : Verbose
-o <output>: Output directory
<directory>: Working directory
.
├── assets
│ └── me.webp
├── config.cfg
├── index.html
├── partials
│ ├── footer.html
│ ├── navbar.html
├── projects.html
└── templates
└── base.html
/partials
<!-- index.html -->
<html>
<body>
{{ include "navbar.html" }}
...
</body>
</html>
<!-- templates/base.html -->
<html>
<head>
{{ content "head" }}
</head>
<body>
{{ body }}
</body>
</html>
<!-- index.html -->
{{ contentfor "head" }}
<title>HOME</title>
{{ endcontent }}
<p>...</p>
<!-- projects/xyz.html -->
title = XYZ
links = [
href = https://example.org
label = abc
___
href = https://google.com
label = test
]
---
<h1>XYZ!</h1>
<!-- index.html -->
{{ eachdo resources.projects }}
<p>{{ put title }}</p>
{{ endeachdo }}
{{ eachdo page.links }}
<p>{{ put href }}</p>
<p>{{ put label }}</p>
{{ endeachdo }}
<!-- config.cfg -->
links = [
href = https://github.com/compromyse
label = GITHUB
___
href = https://www.linkedin.com/in/compromyse
label = LINKEDIN
]
<!-- index.html -->
{{ eachdo config.links }}
<a href="{{ put href }}" class="button" target="_blank">{{ put label }}</a>
{{ endeachdo }}
<!-- projects/xyz.html -->
template = base_tailwind.html
---
<h1 class="p-2">XYZ!</h1>
Licensed under GPLv3