]> git.r.bdr.sh - rbdr/page/blame_incremental - README.md
Remove no longer necessary code
[rbdr/page] / README.md
... / ...
CommitLineData
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
73Run tests with `make test`.
74
75If you have [tarpaulin][tarpaulin], you can also run `make coverage` to get
76coverage information.
77
78# Distribution of Builds
79
80Builds are available at [build.r.bdr.sh][rbdr-builds]. The linux builds are
81generated automatically by the CI: Unstable builds are built from the `main`
82branch, and stable releases are built from tags.
83
84For mac, the process is still manual, since the commands need to be run from
85a macos machine by running `make mac` for unstable builds, and
86`make -e tag=M.m.p` for stable builds.
87
88[tarpaulin]: https://github.com/xd009642/tarpaulin
89[rbdr-builds]: https://build.r.bdr.sh/page/