1
0
Fork 0
mirror of https://git.sr.ht/~adnano/kiln synced 2024-06-07 23:56:06 +02:00

site: Remove support for site URLs

This commit is contained in:
adnano 2021-10-02 16:59:36 -04:00
parent 928e336122
commit 0b253d56b4
3 changed files with 3 additions and 14 deletions

View File

@ -177,14 +177,9 @@ The following keys are supported:
:[ *Description*
| title
: Site title
| urls
: A list of site URLs
| params
: Extra parameters made available to templates
Site URLs may contain paths, but should not end with a trailing slash. Multiple
site URLs may be specified for sites that are available at multiple locations.
## PERMALINKS
Permalinks can be used to rewrite page paths. Permalinks are specified in the
@ -633,8 +628,6 @@ Site metadata contains the following data:
:[ *Description*
| Title
: The title of the site.
| URLs
: The URLs of the site.
| Params
: Extra parameters specified in configuration.
| Generated

View File

@ -12,7 +12,6 @@ import (
// Site represents a site.
type Site struct {
Title string `toml:"title"`
URLs []string `toml:"urls"`
Tasks []*Task `toml:"tasks"`
Params map[string]string `toml:"params"`
Permalinks map[string]string `toml:"permalinks"`

View File

@ -1,17 +1,14 @@
{{ `<?xml version="1.0" encoding="utf-8"?>` | safeHTML }}
<feed xmlns="http://www.w3.org/2005/Atom">
<id>{{ index site.URLs 0 }}{{ .Permalink }}</id>
<id>{{ .Permalink }}</id>
<title>{{ .Title }}</title>
<updated>{{ site.Generated.Format "2006-01-02T15:04:05Z07:00" }}</updated>
<link href="{{ index site.URLs 0 | safeURL }}{{ .Permalink }}" rel="alternate"/>
<link href="{{ .Permalink }}" rel="alternate"/>
{{ range .Pages }}<entry>
<id>{{ index site.URLs 0 }}{{ .Permalink }}</id>
<id>{{ .Permalink }}</id>
<title>{{ .Title }}</title>
<updated>{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}</updated>
{{- $permalink := .Permalink }}
{{- range site.URLs }}
<link href="{{ . | safeURL }}{{ $permalink }}" rel="alternate"/>
{{- end }}
</entry>
{{ end -}}
</feed>