aboutsummaryrefslogtreecommitdiffgithub
diff options
context:
space:
mode:
authorAustin Adams <git@austinjadams.com>2017-02-28 08:59:17 -0500
committerAustin Adams <git@austinjadams.com>2017-02-28 09:30:55 -0500
commitaa0d9380b9710de1ebf1ed4ea27805ddf008e27f (patch)
tree55c67fa77d4d9108fa1da3010823585c7e264a68
parentf36a8ff45e3b8b5eade631a03984e9215da8be86 (diff)
downloadwebzone-aa0d9380b9710de1ebf1ed4ea27805ddf008e27f.tar.gz
webzone-aa0d9380b9710de1ebf1ed4ea27805ddf008e27f.tar.xz
layout: Display "Blog" in <title>s
For the blog listing and blog posts, display "Blog" in the page title.
-rw-r--r--layouts/partials/layout.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/layouts/partials/layout.html b/layouts/partials/layout.html
index b89b0dd..e498b85 100644
--- a/layouts/partials/layout.html
+++ b/layouts/partials/layout.html
@@ -1,7 +1,10 @@
-<!DOCTYPE html>
+{{/* This manual URL checking (yuck!) is needed because of
+ https://github.com/spf13/hugo/issues/954#issuecomment-81928889
+*/}}{{ $isBlog := (or (eq .URL "/blog/") (eq .Section "blog")) }}{{/*
+*/}}<!DOCTYPE html>
<html>
<head>
- <title>{{ if .IsPage }}{{ .Title }} « {{ end }}{{ .Site.Title }}</title>
+ <title>{{ if .IsPage }}{{ .Title }} « {{ end }}{{ if $isBlog }}Blog « {{ end }}{{ .Site.Title }}</title>
<meta charset="utf-8">
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="{{ .Site.BaseURL }}css/style.css">
@@ -32,8 +35,7 @@
<div id="container">
<header>
<h1 id="name"><a href="{{ .Site.BaseURL }}">Austin Adams</a></h1>
- {{/* Manual URL checking (yuck!) is needed because of https://github.com/spf13/hugo/issues/954#issuecomment-81928889 */}}
- {{ if (or (eq .URL "/blog/") (eq .Section "blog")) }}
+ {{ if $isBlog }}
<div id="tagline"><a href="/blog/">The Blog</a></div>
{{ else }}
<div id="tagline">Georgia Tech Student, programmer, GNU/Linux finesser</div>