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* :[ *Description*
| title | title
: Site title : Site title
| urls
: A list of site URLs
| params | params
: Extra parameters made available to templates : 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
Permalinks can be used to rewrite page paths. Permalinks are specified in the Permalinks can be used to rewrite page paths. Permalinks are specified in the
@ -633,8 +628,6 @@ Site metadata contains the following data:
:[ *Description* :[ *Description*
| Title | Title
: The title of the site. : The title of the site.
| URLs
: The URLs of the site.
| Params | Params
: Extra parameters specified in configuration. : Extra parameters specified in configuration.
| Generated | Generated

View file

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

View file

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