diff options
author | Hylke Visser <git@htdvisser.nl> | 2019-06-14 12:50:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-14 12:50:54 +0300 |
commit | e481251411565ceaf410caa5fa52412c5940bf7c (patch) | |
tree | 1543f706715f8622573f137172aacc0d955ec1ec | |
parent | 08da946564604b132fde4b5227a6dfcf32aba940 (diff) | |
parent | cdc4ae021e2bf1f3b949c1425b57079ca44d5741 (diff) |
"Urlize" Tags and Categories in Article and swap ".Hugo" for "hugo" (#20)
"Urlize" Tags and Categories in Article and swap ".Hugo" for "hugo"
-rw-r--r-- | layouts/partials/article.html | 4 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 | ||||
-rw-r--r-- | layouts/partials/homepage.html | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/article.html b/layouts/partials/article.html index c69a76f..a1da41b 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -9,7 +9,7 @@ <span class="key">{{ if $page.Date.IsZero }}published {{ end }}in</span> <span class="val"> {{ range . }} - <a href="{{ . | printf "categories/%s" | relURL }}">{{ . }}</a> + <a href="{{ . | urlize | printf "categories/%s" | relURL }}">{{ . }}</a> {{ end }} </span> {{ end }} @@ -18,7 +18,7 @@ <span class="key">tags:</span> <span class="val"> {{ range . }} - <a href="{{ . | printf "tags/%s" | relURL }}">{{ . }}</a> + <a href="{{ . | urlize | printf "tags/%s" | relURL }}">{{ . }}</a> {{ end }} </span> {{ end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index dcda671..c847d77 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -9,7 +9,7 @@ {{- with $.Param "author" }} <meta name="author" content="{{ . }}"> {{- end }} -{{ .Hugo.Generator }} +{{ hugo.Generator }} <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="{{ "css/style.css" | relURL }}" type="text/css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700" type="text/css"> diff --git a/layouts/partials/homepage.html b/layouts/partials/homepage.html index 81177dc..dafb303 100644 --- a/layouts/partials/homepage.html +++ b/layouts/partials/homepage.html @@ -21,7 +21,7 @@ <section class="categories"> {{ range $name, $value := . }} <h2 class="category"> - <a href="{{ $baseurl }}categories/{{ $name | urlize }}">{{ title $name }}</a> + <a href="{{ $baseurl }}categories/{{ $name | urlize }}">{{ humanize $name | title }}</a> <small>({{ .Count }})</small> </h2> {{ end }} |