From 1e2d00b62ecce95f71d4bfd60a043c8e86631eee Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Sat, 15 Apr 2023 16:21:44 +0200 Subject: Read the files --- README.gmi | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 README.gmi (limited to 'README.gmi') diff --git a/README.gmi b/README.gmi new file mode 100644 index 0000000..62390d4 --- /dev/null +++ b/README.gmi @@ -0,0 +1,58 @@ +# page + +A static website generator for exactly 1 use case. + +"I have a bunch of gemini files that I want to serve as-is, but I also +want to generate some HTML" + +## How to use + +1. Stand on the directory you want to turn into a page +2. run page +3. your output is in ../_html + +So for example: + +``` +$ pwd +/home/rbdr/web/website +$ page +$ ls .. +website/ +website_html/ +``` + +## Front Matter + +You can add some optional front matter. We'll look at the two first lines that +start with `---` + +The format is: + +``` +--- title: the title of the page +--- description: a description +``` + +This only works if they are the first lines of the page. + +## Local Path Translation + +Links that end with `.gmi` will be replaced with `.html` unless they specifically start with `gemini:` + +## Layouts + +page expects a file called _layout.html in the root. It expects three placeholders: + +* {{ content }} the generated HTML from parsing the gemini text files. +* {{ title }} the frontmatter title or an empty string. +* {{ description }} the frontmatter description or an empty string. + + +## Hidden folders + +Hidden folders get ignored, except for the .well-known folder. + +## What happens to files that aren't gemini? + +They're copied as-is. -- cgit