~adnano/kiln

6eb5e45afa7655b214b04457888655a2036b7198 — Adnan Maolood 1 year, 8 months ago 686f6a7
site: Remove support for site URLs
3 files changed, 3 insertions(+), 14 deletions(-)

M docs/kiln.1.scd
M site.go
M templates/_default/atom.xml
M docs/kiln.1.scd => docs/kiln.1.scd +0 -7
@@ 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

M site.go => site.go +0 -1
@@ 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"`

M templates/_default/atom.xml => templates/_default/atom.xml +3 -6
@@ 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>