||4 months ago|
|example||5 months ago|
|.gitignore||5 months ago|
|LICENCE||5 months ago|
|README.md||5 months ago|
|linluwi.fnl||4 months ago|
- linluwi (noun)
- network, Internet (toki pona)
linluwi is a static website and gemini capsule generator, originally written for my own personal use. It handles static pages and content and maintaining a log with RSS and ass feeds. It's intended to be small and easy to hack on, and to maintain parity between the web and gemini versions of a site.
linluwi is written in the fennel programming language, so you will need to download and set up a fennel environment, following the instructions from the fennel website. I would recommend running fennel in a lua environment rather than using the executable, as you will also need the luafilesystem library, which is easiest downloaded using luarocks:
luarocks install luafilesystem
with both of these installed, put the linluwi.fnl file from this repository in a new directory. You can now run linluwi using
To configure linluwi, you will need to modify the configuration variables at the top of
linluwi.fnl. These are commented as to what they do, and should be changed to whatever is appropriate to your site.
Once you have configured linluwi, you can start using it!
Your input content needs to go in a content directory, by default called "content" in the same directory as linlui.fnl (changable with the configuration variables). Input pages are in the gemtext format and have the extension .gmi. These files will be converted to HTML for the web output and formatted properly for a gemini capsule for the gemini output.
.gmi files in a subdirectory called
log will also be processed as log posts (see below). All other files (images, stylesheets, .html files in the input, etc) are copied into the output unchanged. All files (including pages and log posts) keep their position in the input directory structure.
linluwi has no theme system and makes no attempt to manage stylesheets. This is left to the user (for example, by putting a .css file in the input directory and adding a stylesheet link to it in your HTML header).
To generate your site, run
fennel linlui.fnl in the directory where you have the script saved. This should create the public_html and public_gemini directories, which you can then upload to your hosts.
Log posts (.gmi files in a
log subdirectory of the content directory) are handled slightly differently than other input files. In addition to being converted and copied to the output like pages, they have some specific metadata (required in the post file) that is used to generate basic blog and gemlog index pages (see https://itwont.work/log for an example).
Log posts may have any filename, but I recommend making filenames descriptive of the content, as they are also used as the URL slugs for posts. The first two lines of a log post must be in the format:
# title YYYY-MM-DD
where YYYY-MM-DD is the date of posting. For example:
# Look at this Awesome Thing! 2022-01-05
The rest of the content of a post is processed exactly like any other page.
See the example site in
example/ to see this structure.
if you use this tool and find any issues, you can contact me via mastodon at @firstname.lastname@example.org or via email on email@example.com (where I will also accept patches).