diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-15 16:21:44 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-04-15 16:21:44 +0200 |
| commit | 1e2d00b62ecce95f71d4bfd60a043c8e86631eee (patch) | |
| tree | 96b78d90d01dd8d5765ac46cdad15eb783b3fdf0 /README.gmi | |
| parent | 8d4fac527ea33456de21933b4632a5bf4abbfc8d (diff) | |
Read the files
Diffstat (limited to 'README.gmi')
| -rw-r--r-- | README.gmi | 58 |
1 files changed, 58 insertions, 0 deletions
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 ../<directory_name>_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. |