NDUJA -- an sms-sized ssg
nduja is a static site generator that can fit in a text message or an old-school
tweet, just barely. It's 140 bytes long on the nose. In fact, I'll put the
whole thing here for you:
```
#!/bin/sh
X()(eval "dd<<.
`awk -vRS= '!/^{$0="
"$0"
"}//'`
.");N()(X${n%.n});T
` tags to paragraphs not starting with a `<`
2. expands the template file (T) as a shell here-document with its contents.
if `T` doesn't exist, it's created for you! isn't that neat :)
I've even added in EXTENSIBILITY:
If a library file (L) exists, it'll be sourced, meaning you can define whatever
shell functions you need to make writing your site easier. Crucially, you can
redefine these two functions:
- `X`, the eXpando function, which defines how to plop your content into T.
- `N`, the NDUJA function, which defines what to do to turn a .n file into a
.. whatever.
Go nuts! You could argue that by redefining those two functions, nduja is not
really text-sized, but i don't care! the actual script contains the
functionality you technically need ;)
LICENSE: there isn't one, silly! This program is released to the PUBLIC DOMAIN
see also: unk, nef, ...