From 160a27bd2aa334a881f7c54847ef406925f87633 Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Mon, 17 Apr 2023 20:21:42 +0200 Subject: Replace gmi with md --- Cargo.lock | 2 +- README.gmi | 69 ------------------------------------------------------------- README.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 70 deletions(-) delete mode 100644 README.gmi create mode 100644 README.md diff --git a/Cargo.lock b/Cargo.lock index 40f6366..a3327a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,4 +4,4 @@ version = 3 [[package]] name = "page" -version = "0.1.0" +version = "1.0.0" diff --git a/README.gmi b/README.gmi deleted file mode 100644 index d53a207..0000000 --- a/README.gmi +++ /dev/null @@ -1,69 +0,0 @@ -# page - -A static website generator for exactly 1 use case. - -"I have a bunch of gemini files that I want to serve as-is, but I also -want to generate some HTML" - -## How to use - -1. Stand on the directory you want to turn into a page -2. run page -3. your output is in ../_html - -So for example: - -``` -$ pwd -/home/rbdr/web/website -$ page -$ ls .. -website/ -website_html/ -``` - -## Front Matter - -You can add some optional front matter. We'll look at the two first lines that -start with `---` - -The format is: - -``` ---- title: the title of the page ---- description: a description -``` - -This only works if they are the first lines of the page. - -## Local Path Translation - -Links that end with `.gmi` will be replaced with `.html` unless they specifically start with `gemini:` - -## Layouts - -page expects a file called _layout.html in the root. It expects three placeholders: - -* {{ content }} the generated HTML from parsing the gemini text files. -* {{ title }} the frontmatter title or an empty string. -* {{ description }} the frontmatter description or an empty string. - - -## Hidden folders - -Hidden folders are copied as well, we only make an exception for `.git/`, and -`.gitignore` which are explicitly ignored. This is handy for folders like -`.well-known`, but could cause unwanted behavior if there's other hidden files -in the directory. - -## What happens to files that aren't gemini? - -They're copied as-is. - -# Building - -This project is built using cargo. A makefile is provided to run common tasks. - -Build dev version with `make` or `make build`. - -Build release with `make -e profile=release` or `make -e profile=release build`. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b842b0a --- /dev/null +++ b/README.md @@ -0,0 +1,70 @@ +# page + +A static website generator for exactly 1 use case. + +"I have a bunch of gemini files that I want to serve as-is, but I also +want to generate some HTML" + +## How to use + +1. Stand on the directory you want to turn into a page +2. run page +3. your output is in ../_html + +So for example: + +``` +$ pwd +/home/rbdr/web/website +$ page +$ ls .. +website/ +website_html/ +``` + +## Front Matter + +You can add some optional front matter. We'll look at the two first lines that +start with `---` + +The format is: + +``` +--- title: the title of the page +--- description: a description +``` + +This only works if they are the first lines of the page. + +## Local Path Translation + +Links that end with `.gmi` will be replaced with `.html` unless they specifically start with `gemini:` + +## Layouts + +page expects a file called _layout.html in the root. It expects three placeholders: + +* {{ content }} the generated HTML from parsing the gemini text files. +* {{ title }} the frontmatter title or an empty string. +* {{ description }} the frontmatter description or an empty string. + + +## Hidden folders + +Hidden folders are copied as well, we only make an exception for `.git/`, and +`.gitignore` which are explicitly ignored. This is handy for folders like +`.well-known`, but could cause unwanted behavior if there's other hidden files +in the directory. + +## What happens to files that aren't gemini? + +They're copied as-is. + +# Building + +This project is built using cargo. A makefile is provided to run common tasks. + +Build dev version with `make` or `make build`. + +Build release with `make -e profile=release` or `make -e profile=release build`. + -- cgit