]> git.r.bdr.sh - rbdr/page/blame - README.md
Update README
[rbdr/page] / README.md
CommitLineData
1e2d00b6
RBR
1# page
2
3A static website generator for exactly 1 use case.
4
5"I have a bunch of gemini files that I want to serve as-is, but I also
6want to generate some HTML"
7
8## How to use
9
101. Stand on the directory you want to turn into a page
112. run page
05a467ca
RBR
123. your html output is in ../<directory_name>_html
134. your gemini without frontmatter output is in ../<directory_name>_gemini
1e2d00b6
RBR
14
15So for example:
16
17```
18$ pwd
19/home/rbdr/web/website
20$ page
21$ ls ..
22website/
23website_html/
05a467ca 24website_gemini/
1e2d00b6
RBR
25```
26
27## Front Matter
28
29You can add some optional front matter. We'll look at the two first lines that
30start with `---`
31
32The format is:
33
34```
35--- title: the title of the page
36--- description: a description
37```
38
39This only works if they are the first lines of the page.
40
41## Local Path Translation
42
43Links that end with `.gmi` will be replaced with `.html` unless they specifically start with `gemini:`
44
45## Layouts
46
47page expects a file called _layout.html in the root. It expects three placeholders:
48
49* {{ content }} the generated HTML from parsing the gemini text files.
50* {{ title }} the frontmatter title or an empty string.
51* {{ description }} the frontmatter description or an empty string.
52
53
54## Hidden folders
55
7a397dd9
RBR
56Hidden folders are copied as well, we only make an exception for `.git/`, and
57`.gitignore` which are explicitly ignored. This is handy for folders like
58`.well-known`, but could cause unwanted behavior if there's other hidden files
59in the directory.
1e2d00b6
RBR
60
61## What happens to files that aren't gemini?
62
63They're copied as-is.
48ea9080
RBR
64
65# Building
66
67This project is built using cargo. A makefile is provided to run common tasks.
68
69Build dev version with `make` or `make build`.
70
71Build release with `make -e profile=release` or `make -e profile=release build`.
160a27bd 72