]> git.r.bdr.sh - rbdr/git-sync-all/blame - README.md
Initial commit: sync with origin
[rbdr/git-sync-all] / README.md
CommitLineData
7263eddf
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
123. your html output is in ../<directory_name>_html
134. your gemini without frontmatter output is in ../<directory_name>_gemini
14
15So for example:
16
17```
18$ pwd
19/home/rbdr/web/website
20$ page
21$ ls ..
22website/
23website_html/
24website_gemini/
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
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.
60
61## What happens to files that aren't gemini?
62
63They're copied as-is.
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`.
72