Move index templates up to layouts/
This commit is contained in:
parent
a0994e75e9
commit
af23a386cf
3 changed files with 11 additions and 6 deletions
|
@ -1,28 +0,0 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}} {{ $pctx = .Site }} {{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}}
|
||||
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link href="{{ `/feed.xml` | absURL }}" rel="self" />
|
||||
<link href="{{ .Permalink }}" />
|
||||
{{ if not .Date.IsZero }}<updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated>{{ end }}
|
||||
<id>{{ .Permalink }}</id>
|
||||
{{ with .Site.Author.name }}
|
||||
<author>
|
||||
<name>{{ . }}</name>
|
||||
{{ with $.Site.Author.email }}<email>{{ . }}</email>{{ end }}
|
||||
<uri>{{ $.Site.Home.Permalink }}</uri>
|
||||
</author>
|
||||
{{ end }}
|
||||
<generator version="{{ hugo.Version }}" uri="https://gohugo.io">Hugo {{ hugo.Version }}</generator>
|
||||
<rights>© {{ now.Year }} Eryn Wells</rights>
|
||||
{{ range $pages }}{{ .Render "atom_entry" }}{{ end }}
|
||||
</feed>
|
|
@ -1,16 +0,0 @@
|
|||
{{ define "main" }}
|
||||
<div class="platter grid">
|
||||
<h1 class="site">{{ .Title }}</h1>
|
||||
<div id="content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{- with site.Menus.main -}}
|
||||
{{- $url := $.RelPermalink -}}
|
||||
<nav class="site bulleted">
|
||||
{{- range . -}}
|
||||
<li><a class="{{ if eq .URL $url }}active{{ end }}" href="{{ .URL }}"><span>{{ .Name }}</span></a></li>
|
||||
{{- end -}}
|
||||
</nav>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
|
@ -1,30 +0,0 @@
|
|||
{{- $pctx := . -}}
|
||||
{{- if .IsHome -}}
|
||||
{{ $pctx = .Site }}
|
||||
{{- end -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- if or $.IsHome $.IsSection -}}
|
||||
{{- $pages = $pctx.RegularPages -}}
|
||||
{{- else -}}
|
||||
{{- $pages = $pctx.Pages -}}
|
||||
{{- end -}}
|
||||
{{- $limit := .Site.Config.Services.RSS.Limit -}}
|
||||
{{- if ge $limit 1 -}}
|
||||
{{- $pages = $pages | first $limit -}}
|
||||
{{- end -}}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Recent content on {{ .Site.Title }}</description>
|
||||
<generator>Hugo {{ hugo.Version }} -- gohugo.io</generator>
|
||||
{{ with .Site.LanguageCode }}<language>{{ . }}</language>{{ end }}
|
||||
{{ with .Site.Author }}<managingEditor>{{ .name }} <{{ .email }}></managingEditor>{{ end }}
|
||||
{{ with .Site.Author.email }}<webMaster>{{ .name }} <{{ .email }}></webMaster>{{ end }}
|
||||
{{ with .Site.Copyright }}<copyright>{{ . }}</copyright>{{ end }}
|
||||
{{ if not .Date.IsZero }}<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
|
||||
{{ with .OutputFormats.Get "RSS" }}{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}{{ end }}
|
||||
{{ range $pages }}{{ .Render "rss_item" }}{{ end }}
|
||||
</channel>
|
||||
</rss>
|
Loading…
Add table
Add a link
Reference in a new issue