diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-08-02 10:35:20 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-08-02 10:35:20 +0530 |
commit | a23a1609de4c063a823671fb7079b7d2deb0675e (patch) | |
tree | d7578a323671e1f471ce69c041518976b6dfd5e5 /projects/msg.md | |
parent | d257acac369a77f892579166ba2bcfe1818e59ca (diff) |
projects: hydrate pages with README and add page structure
Diffstat (limited to 'projects/msg.md')
-rw-r--r-- | projects/msg.md | 95 |
1 files changed, 94 insertions, 1 deletions
diff --git a/projects/msg.md b/projects/msg.md index 0eaeddf..2a8851e 100644 --- a/projects/msg.md +++ b/projects/msg.md @@ -3,6 +3,99 @@ description = An incredibly opinionated, hackable, minimal Static Site Generator languages = C url = /projects/msg template = project.html +link = https://github.com/compromyse/msg +linklabel = SOURCE --- -# MSG +> See https://github.com/compromyse/compromyse.xyz for an example site. + +### Compilation & Usage +```sh +# 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 +``` + +### Site Structure +```sh +. +├── assets +│ └── me.webp +├── config.cfg +├── index.html +├── partials +│ ├── footer.html +│ ├── navbar.html +├── projects.html +└── templates + └── base.html +``` + +### Features + +#### Includes - include files from `/partials` + +```html +<!-- index.html --> +<html> + <body> + {{ include "navbar.html" }} + ... + </body> +</html> +``` + +#### Contentfor - define content for templates + +```html +<!-- templates/base.html --> +<html> + <head> + {{ content "head" }} + </head> + <body> + {{ body }} + </body> +</html> + +<!-- index.html --> +{{ contentfor "head" }} +<title>HOME</title> +{{ endcontent }} + +<p>...</p> +``` + +#### Eachdo - iterate over resources +```html +<!-- projects/xyz.html --> +title = XYZ +--- + +<h1>XYZ!</h1> + +<!-- index.html --> +{{ eachdo projects }} +<p>{{ put title }}</p> +{{ endeachdo }} +``` + +#### Template - specify template for page +```html +<!-- projects/xyz.html --> +template = base_tailwind.html +--- + +<h1 class="p-2">XYZ!</h1> +``` |