diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-03-13 11:29:57 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-03-13 11:29:57 +0100 |
| commit | a411ac34c5895e8ea4ddeed6b72f4787886a1ab0 (patch) | |
| tree | 6afad70aad3976100fdfa31c4c9c2a4bf110cbf6 /man | |
| parent | 8a12b5cd2b2fe5beb2cb72ecda8b51a707ea80f8 (diff) | |
Add the packaging steps + manual
Diffstat (limited to 'man')
| -rw-r--r-- | man/page.1 | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/man/page.1 b/man/page.1 new file mode 100644 index 0000000..40ed0c4 --- /dev/null +++ b/man/page.1 @@ -0,0 +1,93 @@ +.TH PAGE 1 "2024-03-13" "1.3.1" "Page Manual" +.SH NAME +page \- gemtext based static website generation tool for gemini and http. +.SH SYNOPSIS +.B page +.SH DESCRIPTION +.PP +page is a tool that lets you create a static website from a directory of +gemtext files. +.PP +To use, go to the directory containing the site, and run \fBpage\fR. It will +create two directories in the parent directory using the same name but +appending \fB_html\fR and \fB_gemini\fR. +.SH FOLDER STRUCTURE +The website directory has some requirements for page to work correctly. It +must contain \fIgemtext\fR and a \fIlayout\fR, and optionally may contain +static files. +.SH GEMTEXT +.P +Any file with ending \fI.gmi\fR is interpreted as gemtext and will be parsed +as html with the following rules: +.TP +\- The first two lines are checked for front matter +.TP +\- If the first or second line starts with \fB--- title:\fR, the text following will be treated as the title of the page and the line will be removed from the output. +.TP +\- If the first or second line starts with \fB--- description:\fR, the text following will be treated as the description of the page and the line will be removed from the output. +.TP +\- URLs that end with the extension \fI.gmi\fR will be replaced with \fI.html\fR unless the url begins with \fIgemini:\fR +.P +Example, this could be index.gmi. The first link will be converted to html but the second won't: +.nf +\f(CW +--- title: Home +--- description: Clemland is dedicated to all things sound + +# Welcome to Clemland + +My projects are located here: + +=> /projects.gmi Projects + +This is a good gemini page: + +=> gemini://r.bdr.sh/page.gmi +\fR +.fi +.SH LAYOUT +A file called _layout.html at the root of the element. It must be present. It +should include the three following keywords, \fBexactly as shown\fR. +.TP +.B {{ title }} +will get replaced with the front matter title of the gemtext file. +.TP +.B {{ description }} +will get replaced with the front matter description of the gemtext file. +.TP +.B {{ content }} +will get replaced with the body of the gemtext file. +.P +For example: +.nf +\f(CW +<!DOCTYPE HTML> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="author" content="Clem Fandango"> + <meta name="description" content="{{ description }}"> + + <title>Clemland {{ title }}</title> + + <link rel="stylesheet" type="text/css" href="/style.css"> + </head> + <body> + <main> + {{ content }} + </main> + </body> +</html> +\fR +.fi +.SH STATIC FILES +Any file that isn't gemtext or the layout will be copied as-is. This includes +hidden files! The only ones that are excluded are .git and .gitignore. +.SH VERSION +.BR 1.3.1 +.SH HOMEPAGE +.I https://r.bdr.sh/page.html +.SH AUTHORS +\ Rubén Beltrán del Río <\fIpage@r.bdr.sh\fP> |