From 924746b8ab4904d24a3cb242b95e8b91f0970129 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Tue, 2 Jun 2026 17:19:14 -0700 Subject: initial (functional?) version --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..89e3781 --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# Loom - Minimal site "generator" +Loom is a single file haskell program that generates a static html site from a given set of framgents. It is heavily inspired by (node)[https://git.sr.ht/~tagglink/node]. + +## Building Loom +Loom requires a Haskell2010 compiler and the following packages: +- text +- filepath +- directory + +GHC should work if it's decently recent. MHS likely is also workable but untested. + +## Using Loom +Simply make a directory of html fragments such as: +``` +testbak/ +├── a.html +├── b +│   ├── c.frag +│   ├── d +│   │   ├── e.html +│   │   └── index.html +│   └── index.html +└── index.html +``` +where `.frag` and `.html` are equivalent, and invoke loom: +``` +loom -r {root path} -o {output path} [-s {static path}] +``` + +Each fragment will generate a html page in the output directory in the same structure. The generated page will be composed of a header and footer with the text of the fragment placed in `
`. The header also conatins the title of the page, which can be specified by placing a line +``` + +``` +on the first line of the fragment file. The title cannot contain newlines or the vertical bar character. If unspecified it will default to the basename of the fragment file. + +The header will also include a `