mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
Improve configuration of multiple URLs
This commit is contained in:
parent
713f2e33c8
commit
08077605ac
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"git.sr.ht/~adnano/go-ini"
|
"git.sr.ht/~adnano/go-ini"
|
||||||
|
@ -36,8 +37,8 @@ func (c *Config) Load(path string) error {
|
||||||
switch key {
|
switch key {
|
||||||
case "title":
|
case "title":
|
||||||
c.Title = value
|
c.Title = value
|
||||||
case "url":
|
case "urls":
|
||||||
c.URLs = append(c.URLs, value)
|
c.URLs = strings.Fields(value)
|
||||||
}
|
}
|
||||||
case "feeds":
|
case "feeds":
|
||||||
c.Feeds[key] = value
|
c.Feeds[key] = value
|
||||||
|
|
|
@ -71,8 +71,8 @@ Site metadata contains the following information:
|
||||||
:[ *Description*
|
:[ *Description*
|
||||||
| Title
|
| Title
|
||||||
: The title of the site.
|
: The title of the site.
|
||||||
| URL
|
| URLs
|
||||||
: The URL of the site.
|
: The URLs of the site.
|
||||||
|
|
||||||
To configure these variables, see *CONFIGURATION*.
|
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".
|
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
|
## HTML TEMPLATES
|
||||||
|
|
||||||
|
@ -163,12 +163,12 @@ The following keys are supported:
|
||||||
:[ *Description*
|
:[ *Description*
|
||||||
| title
|
| title
|
||||||
: Site title
|
: Site title
|
||||||
| url
|
| urls
|
||||||
: Site URL.
|
: A list of site URLs separated by whitespace.
|
||||||
|
|
||||||
Site URLs are only used when generating Atom feeds.
|
Site URLs are only used when generating Atom feeds.
|
||||||
Site URLs should not end with a trailing slash.
|
Site URLs may contain paths, but should not end with a trailing slash.
|
||||||
More than one site URL may be specified by specifying multiple url keys.
|
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.
|
This allows a site that is hosted on both Gemini and HTTP to specify URLs for both locations.
|
||||||
|
|
||||||
The following sections are supported:
|
The following sections are supported:
|
||||||
|
|
Loading…
Reference in a new issue