From a411ac34c5895e8ea4ddeed6b72f4787886a1ab0 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Wed, 13 Mar 2024 11:29:57 +0100 Subject: Add the packaging steps + manual --- man/page.1 | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 man/page.1 (limited to 'man') 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 + + + + + + + + + + Clemland {{ title }} + + + + +
+ {{ content }} +
+ + +\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> -- cgit