1
0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-11-08 10:09:18 +01:00

Improve configuration of multiple URLs

This commit is contained in:
adnano 2020-12-21 16:41:05 -05:00
parent 713f2e33c8
commit 08077605ac
2 changed files with 10 additions and 9 deletions

@ -2,6 +2,7 @@ package main
import (
"os"
"strings"
"text/template"
"git.sr.ht/~adnano/go-ini"
@ -36,8 +37,8 @@ func (c *Config) Load(path string) error {
switch key {
case "title":
c.Title = value
case "url":
c.URLs = append(c.URLs, value)
case "urls":
c.URLs = strings.Fields(value)
}
case "feeds":
c.Feeds[key] = value

@ -71,8 +71,8 @@ Site metadata contains the following information:
:[ *Description*
| Title
: The title of the site.
| URL
: The URL of the site.
| URLs
: The URLs of the site.
To configure these variables, see *CONFIGURATION*.
@ -135,7 +135,7 @@ Atom feed templates are provided with the following information:
Feeds are written to the directory path plus "atom.xml".
The default feed template uses the site URL, if present, to make relative links into absolute URLs.
The default feed template uses the site URLs, if present, to make relative links into absolute URLs.
## HTML TEMPLATES
@ -163,12 +163,12 @@ The following keys are supported:
:[ *Description*
| title
: Site title
| url
: Site URL.
| urls
: A list of site URLs separated by whitespace.
Site URLs are only used when generating Atom feeds.
Site URLs should not end with a trailing slash.
More than one site URL may be specified by specifying multiple url keys.
Site URLs may contain paths, but should not end with a trailing slash.
Multiple site URLs may be specified if they are separated by whitespace.
This allows a site that is hosted on both Gemini and HTTP to specify URLs for both locations.
The following sections are supported: