Simplified setting the title tag, added author and date to posts, TODO make optional. Ordering of meta tags. Fixes for alternate outputs like RSS.

This commit is contained in:
Fredrik Jonsson 2017-05-17 22:44:15 +02:00
commit 90cb79d78a
5 changed files with 14 additions and 12 deletions

View file

@ -2,9 +2,9 @@
<html lang="{{ .Site.Language.Lang }}">
<head>
<meta charset="utf-8">
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
<title>{{ block "title" . }}{{ .Title }} – {{ .Site.Title }}{{ end }}</title>
{{ block "meta" . }}{{ end }}
{{ partialCached "meta.html" . -}}
{{ block "meta" . }}{{ end -}}
</head>
<body class="{{ if $.Param "sidebar" | default true }}one-sidebar sidebar-second{{ else }}no-sidebars{{ end }}">

View file

@ -1,6 +1,10 @@
<article class="{{ with .Section }}section-{{ . | urlize }}{{ end }} full-view">
<header>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a><h2>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
<p class="submitted">
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
<span class="created-date">{{ .Date.Format "2 January, 2006" }}</span>
</p>
</header>
<div>
{{ .Content }}

View file

@ -1,5 +1,3 @@
{{ define "title" }}{{ if not .IsHome }}{{ .Title }} - {{ .Site.Title }}{{ end }}{{ end }}
{{ define "meta" }}
{{ partial "section_meta.html" . -}}
{{ end }}

View file

@ -1,5 +1,3 @@
{{ define "title" }}{{ .Title }} - {{ .Site.Title }}{{ end }}
{{ define "meta" }}
{{ partial "single_meta.html" . -}}
{{ end }}

View file

@ -1,6 +1,10 @@
<article class="{{ with .Section }}section-{{ . | urlize }}{{ end }} list-view">
<header>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a><h2>
<p class="submitted">
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
<span class="created-date">{{ .Date.Format "2 January, 2006" }}</span>
</p>
</header>
<div>
{{ .Summary }}