mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
site: Remove support for site URLs
This commit is contained in:
parent
928e336122
commit
0b253d56b4
|
@ -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
|
||||
|
|
1
site.go
1
site.go
|
@ -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"`
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue