From 246bfd003345fd1eea8d96fa8a3d4cc9e31a7be8 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Tue, 10 Nov 2020 19:35:56 -0500 Subject: [PATCH] Fix build error --- doc/kiln.1.scd | 114 +++++++++++++++++++++++++++++++++++++++++++++++++ main.go | 6 --- 2 files changed, 114 insertions(+), 6 deletions(-) create mode 100644 doc/kiln.1.scd diff --git a/doc/kiln.1.scd b/doc/kiln.1.scd new file mode 100644 index 0000000..d8f4702 --- /dev/null +++ b/doc/kiln.1.scd @@ -0,0 +1,114 @@ +kiln(1) + +# NAME + +kiln - a simple static site generator for Gemini sites + +# SYNOPSIS + +_kiln_ + +# SITE STRUCTURE + +A kiln site is organized in the following way: + +|[ *Directory* +:[ *Description* +| src/ +: Site source +| templates/ +: Templates +| dst/ +: Site destination +| dst.html/ +: Site HTML destination + +# TEMPLATES + +kiln looks for templates in the "templates" directory. +The following templates are accepted: + +|[ *Template* +:[ *Description* +| page.gmi +: Page template +| index.gmi +: Directory index template +| output.html +: text/gemini to HTML template + +## PAGE TEMPLATES + +Page templates are provided with the following information: + +|[ *Variable* +:[ *Description* +| Title +: The title of the page +| Date +: The date of the page +| Permalink +: Permalink to the page +| Content +: The contents of the page + +Pages can specify dates in their filenames. +kiln will recognize the date and remove it from the permalink. + +Pages can also specify titles in their content. +kiln will parse and remove the title from the content. + +## INDEX TEMPLATES + +Index templates are provided with the following information: + +|[ *Variable* +:[ *Description* +| Permalink +: Permalink to the directory +| Pages +: List of pages in this directory +| Directories +: List of subdirectories + +# PERMALINKS + +Every page and directory in the site is assigned a permalink. +Permalinks are absolute and point to the destination file. +All files are written to their permalink plus "index.gmi". + +# FRONTMATTER + +Frontmatter uses the _ini_ format. +Keys and values are separated by '='. +The following keys are supported: + +|[ *Key* +:[ *Description* +| title +: The title of the page +| date +: The date of the page, specified in the format "2006-01-02". + +# CONFIGURATION + +kiln looks for a configuration file named "config.ini". +The configuration file uses the _ini_ format. +The following keys are supported: + +|[ *Key* +:[ *Description* +:[ *Default value* +| title +: Site title +: "" +| url +: Site URL +: "" +| atom +: Output an atom feed +: false +| html +: Output HTML +: false + diff --git a/main.go b/main.go index ac82c29..185c47b 100644 --- a/main.go +++ b/main.go @@ -64,12 +64,6 @@ func main() { break } cfg.toHTML = b - case "serve": - b, err := strconv.ParseBool(value) - if err != nil { - fmt.Println(err) - break - } } } })