commit ca4a617
myu be you
·
2026-11-20 19:35:39 +0000 UTC
parent ca4a617
super duper uber init 2
11 files changed,
+157,
-0
+3,
-0
1@@ -0,0 +1,3 @@
2+out/
3+build.lua
4+lib/
A
README.1
+96,
-0
1@@ -0,0 +1,96 @@
2+.Dd $Mdocdate$
3+.Dt MIG 1
4+.Os
5+.Sh NAME
6+.Nm MIG
7+.Nd Mu's Idiotic Generator
8+.Sh SYNOPSIS
9+.Nm ./build.lua
10+.Sh DESCRIPTION
11+the
12+.Nm MIG
13+utility is my personal static site generator. it was used for
14+.Lk https://xorg.fyi
15+.Pp
16+.Nm
17+is written in lua, if you couldn't tell. mostly because i couldn't bear with
18+.Pa /bin/sh
19+anymore (won't say
20+.Em just
21+.Dq sh
22+because that's le problematic media)
23+and also for funsies.
24+.Pp
25+the configuration is read from
26+.Pa config.lua
27+and it must return a table
28+.Pp
29+all string variables in the config can reference any other variable using the
30+{VARIABLE} (one curly brace on each side instead of two) syntax. this is le good because you can reference
31+.Va TITLE
32+inside
33+.Va FOOTER
34+or anywhere else in the config.
35+.Pp
36+.Nm
37+depends on
38+.Lk https://github.com/lunarmodules/luafilesystem ,
39+which must be built from source or installed via whichever package manager u are using when not on a musl libc OS. the
40+.Pa lfs.so
41+packaged with
42+.Nm
43+will fail to load on non-musl systems.
44+.Pp
45+the config variables are:
46+.Bl -tag -width Ds
47+.It Va TITLE
48+the title of the site. supports any variable from
49+.Pa config.lua
50+.It Va FOOTER
51+the html content to display in the footer. supports any variable from
52+.Pa config.lua
53+.It Va INPUT
54+the source directory containing markdown files and templates. defaults to
55+.Pa template
56+.It Va OUTPUT
57+the destination directory for generated html files. defaults to
58+.Pa public
59+.It Va NAVIGNORE
60+an array of filenames or directories to exclude from the generated navbar
61+.It Va LINK
62+the format string used for nav links
63+.It Va LINKCURR
64+the format string used for the currently active nav link
65+.It Va AFTER
66+an array of shell commands to ruun after a successful build
67+.El
68+.Sh TEMPLATES
69+.Nm
70+reads markdown files and puts the rendered html into
71+.Pa template.html
72+located in the
73+.Va INPUT
74+directory
75+.Pp
76+the templating "engine" supports:
77+.Bl -tag -width Ds
78+.It Li {{CONTENT}}
79+replaced by the rendered markdown content
80+.It Li {{NAV}}
81+replaced by the automatically generated nav menu aka "le heckin werc sidebar"
82+.It Li {{FOOTER}}
83+replaced by the
84+.Va FOOTER
85+variable from the config
86+.It Li {{include \&"file.html\&"}}
87+includes the specified file into the template
88+.It Li {{if VARIABLE}} ... {{end}}
89+conditionally renders the block if the variable is defined and not empty or false
90+.It Li {{if not VARIABLE}} ... {{end}}
91+conditionally renders the block if the variable is undefined, empty, or false (i have not fully tested the conditionals. they do work tho.)
92+.It Li {{VARIABLE}}
93+replaced by the corresponding variable from
94+.Pa config.lua
95+.El
96+.Sh SEE ALSO
97+.Xr lua 1
+11,
-0
1@@ -0,0 +1,11 @@
2+return {
3+ TITLE = "{CURR} :: xorg.fyi",
4+ FOOTER = "built with <a href='https://srcdump.net/myu/mig'>mig</a> | src: <a href='https://srcdump.net/myu/xorg.fyi'>srcdump.net</a> | last updated: " .. os.date("!%Y-%m-%d %H:%M UTC"),
5+ INPUT = "src",
6+ OUTPUT = "out",
7+ NAVIGNORE = { "assets" },
8+ IGNORE = { "inc" },
9+ LINK = "{CURR}",
10+ LINKCURR = "@ {CURR}",
11+ AFTER = { 'tree {OUTPUT}' },
12+}
+0,
-0
+3,
-0
1@@ -0,0 +1,3 @@
2+body { font-family: monospace; }
3+main { border-top: 1px dashed; border-bottom: 1px dashed; }
4+nav ul > li { list-style: none; }
+7,
-0
1@@ -0,0 +1,7 @@
2+:: harmful software
3+
4+what can be considered "harmful"?
5+based on the opinion of 1.3 people, software which fits that categorization is
6+> simple,
7+> suckless,
8+> minimal
+5,
-0
1@@ -0,0 +1,5 @@
2+<meta property="og:type" content="website">
3+<meta property="og:url" content="https://xorg.fyi">
4+<meta property="og:title" content="doas pkill x">
5+<meta property="og:description" content="{FOOTER}">
6+<meta name="robots" content="noai">
+1,
-0
1@@ -0,0 +1 @@
2+-- with lots and lots of love, Myu be You
+5,
-0
1@@ -0,0 +1,5 @@
2+Home of maximalist xorg "special" interest group.
3+
4+Many have claimed that xorg 'sucks',
5+the goal of this site is to not only not promote and not make alternative xorg software which fits the label of 'minimalist',
6+but also to prove many of the claims people make against xorg.
+1,
-0
1@@ -0,0 +1 @@
2+> X-Windows: ...A grace carried out to perfection. X-Windows: ...Satisfaction guaranteed. X-Windows: ...Don't get frustrated with it. X-Windows: ...Even your dog will like it. X-Windows: ...Flaky and built to not stay that way. X-Windows: ...Simple solutions to complex problems. X-Windows: ...Perfected beyond belief. X-Windows: ...Form follows function. X-Windows: ...Beauty at your fingertips. X-Windows: ...Belief is our most important resource. X-Windows: ...It could be better, but it'll take time. X-Windows: ...Love could happen to you. X-Windows: ...Japan's secret weapon. X-Windows: ...Let it not get in your way. X-Windows: ...Live the dream. X-Windows: ...More than enough. X-Windows: ...Never had it, now I will. X-Windows: ...No hardware is safe from being saved. X-Windows: ...Power tools for power users. X-Windows: ...Removing limits on productivity. X-Windows: ...Simplicity made simple. X-Windows: ...The cutting edge of contemporaneity. X-Windows: ...The art of competence. X-Windows: ...The defacto standard. X-Windows: ...The first fully modular software. X-Windows: ...The joke that heals. X-Windows: ...The solution for your problem. X-Windows: ...There's not a better way. X-Windows: ...Tell your friends about it. X-Windows: ...You'd better sit down and enjoy it. X-Windows: ...You'll pity the dead.
+25,
-0
1@@ -0,0 +1,25 @@
2+<!DOCTYPE html>
3+<html>
4+ <head>
5+ <meta charset="utf-8">
6+ <title>{{CURR}}</title>
7+ <link rel="stylesheet" href="/assets/style.css">
8+ <link rel="icon" href="/assets/favicon.ico">
9+ {{include "inc/meta.html"}}
10+ </head>
11+ <body>
12+ <nav>
13+ <h3><a href="/">xorg.fyi</a></h3>
14+ {{NAV}}
15+ </nav>
16+ <main>
17+ {{if CONTENT}}
18+ {{CONTENT}}
19+ {{end}}
20+ {{if not HIDDEN}}
21+ {{include "inc/note.md"}}
22+ {{end}}
23+ </main>
24+ <footer>{{FOOTER}}</footer>
25+ </body>
26+</html>