This repository has been archived on 2022-06-12. You can view files and clone it, but cannot push or open issues or pull requests.
linluwi/README.md

56 lines
3.4 KiB
Markdown
Raw Permalink Normal View History

2022-01-05 19:35:14 +00:00
# linluwi
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](https://tilde.town/~dzwdz/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.
## Installation
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](https://fennel-lang.org/setup#downloading-fennel). I would recommend running fennel in a lua environment rather than using the executable, as you will also need the [luafilesystem](https://keplerproject.github.io/luafilesystem/index.html) 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 `fennel linluwi.fnl`.
## Usage
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](https://gemini.circumlunar.space/docs/cheatsheet.gmi) 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.
2022-01-05 19:37:47 +00:00
`.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.
2022-01-05 19:35:14 +00:00
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).
2022-01-05 20:31:12 +00:00
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
2022-01-05 19:35:14 +00:00
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).
2022-01-05 19:37:24 +00:00
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:
2022-01-05 19:35:14 +00:00
```
# 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.
2022-01-05 19:35:14 +00:00
## Support
if you use this tool and find any issues, you can contact me via mastodon at @nihilazo@tiny.tilde.website or via email on nico@itwont.work (where I will also accept patches).