Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/h-enk/doks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenk Verlinde <henk@ventizo.com>2022-07-05 12:16:59 +0300
committerGitHub <noreply@github.com>2022-07-05 12:16:59 +0300
commit97b7af326b63c9e83e8663f56db7d2783faae36f (patch)
tree6655f537dc50c7fc62bc14253118da3fb58f4d1e
parent9e1f7b9677d1bedb2ddb904718c1959413ca384c (diff)
parentf8d4d0915f3d45bc4a0b1379563fa799fe84ad95 (diff)
Merge pull request #798 from h-enk/blog-pages
Better blog pages
-rw-r--r--archetypes/blog.md8
-rw-r--r--assets/images/.gitkeep0
-rw-r--r--assets/images/default-image.pngbin0 -> 4694 bytes
-rw-r--r--assets/js/highlight.js2
-rw-r--r--assets/scss/common/_dark.scss6
-rw-r--r--assets/scss/common/_global.scss4
-rw-r--r--assets/scss/layouts/_posts.scss35
-rw-r--r--config/_default/config.toml16
-rw-r--r--config/_default/params.toml4
-rw-r--r--content/en/blog/say-hello-to-doks/index.md10
-rw-r--r--content/en/blog/say-hello-to-doks/say-hello-to-doks.pngbin8211 -> 0 bytes
-rw-r--r--layouts/_default/list.html35
-rw-r--r--layouts/_default/terms.html20
-rw-r--r--layouts/blog/list.html24
-rw-r--r--layouts/blog/single.html63
-rw-r--r--layouts/contributors/list.html23
-rw-r--r--layouts/partials/content/card-image.html22
-rw-r--r--layouts/partials/content/figure.html37
-rw-r--r--layouts/partials/content/image.html32
-rw-r--r--layouts/partials/header/header.html2
-rw-r--r--layouts/partials/main/blog-meta.html2
21 files changed, 271 insertions, 74 deletions
diff --git a/archetypes/blog.md b/archetypes/blog.md
index b4ad21a..24c911b 100644
--- a/archetypes/blog.md
+++ b/archetypes/blog.md
@@ -1,11 +1,15 @@
---
title: "{{ replace .Name "-" " " | title }}"
description: ""
-lead: ""
+excerpt: ""
date: {{ .Date }}
lastmod: {{ .Date }}
draft: true
weight: 50
-images: ["{{ .Name | urlize }}.jpg"]
+images: []
+categories: []
+tags: []
contributors: []
+pinned: false
+homepage: false
---
diff --git a/assets/images/.gitkeep b/assets/images/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/assets/images/.gitkeep
+++ /dev/null
diff --git a/assets/images/default-image.png b/assets/images/default-image.png
new file mode 100644
index 0000000..a34ff9f
--- /dev/null
+++ b/assets/images/default-image.png
Binary files differ
diff --git a/assets/js/highlight.js b/assets/js/highlight.js
index c96b781..4ad6017 100644
--- a/assets/js/highlight.js
+++ b/assets/js/highlight.js
@@ -7,6 +7,7 @@ import xml from 'highlight.js/lib/languages/xml';
import ini from 'highlight.js/lib/languages/ini';
import yaml from 'highlight.js/lib/languages/yaml';
import markdown from 'highlight.js/lib/languages/markdown';
+import python from 'highlight.js/lib/languages/python';
hljs.registerLanguage('javascript', javascript);
hljs.registerLanguage('json', json);
@@ -16,6 +17,7 @@ hljs.registerLanguage('ini', ini);
hljs.registerLanguage('toml', ini);
hljs.registerLanguage('yaml', yaml);
hljs.registerLanguage('md', markdown);
+hljs.registerLanguage('python', python);
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('pre code:not(.language-mermaid)').forEach((block) => {
diff --git a/assets/scss/common/_dark.scss b/assets/scss/common/_dark.scss
index 4694fd5..91de923 100644
--- a/assets/scss/common/_dark.scss
+++ b/assets/scss/common/_dark.scss
@@ -570,3 +570,9 @@ $navbar-dark-active-color: $link-color-dark;
[data-dark-mode] details summary::before {
content: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28222, 226, 230, 0.75%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 14l6-6-6-6'/%3e%3c/svg%3e");
}
+
+[data-dark-mode] .btn-light {
+ color: $link-color-dark;
+ background: $body-overlay-dark;
+ border: 1px solid $body-overlay-dark;
+}
diff --git a/assets/scss/common/_global.scss b/assets/scss/common/_global.scss
index cbc8e41..e1cee67 100644
--- a/assets/scss/common/_global.scss
+++ b/assets/scss/common/_global.scss
@@ -4,7 +4,9 @@
.error404 .content,
.docs.list .content,
.tutorial.list .content,
-.showcase.list .content {
+.showcase.list .content,
+.categories.list .content,
+.tags.list .content {
padding-top: 1rem;
padding-bottom: 3rem;
}
diff --git a/assets/scss/layouts/_posts.scss b/assets/scss/layouts/_posts.scss
index da27660..27d316a 100644
--- a/assets/scss/layouts/_posts.scss
+++ b/assets/scss/layouts/_posts.scss
@@ -1,6 +1,9 @@
.home .card,
.contributors.list .card,
-.blog.list .card {
+.blog.list .card,
+.blog.single .card,
+.categories.list .card,
+.tags.list .card {
margin-top: 2rem;
margin-bottom: 2rem;
transition: transform 0.3s;
@@ -8,16 +11,34 @@
.home .card:hover,
.contributors.list .card:hover,
-.blog.list .card:hover {
+.blog.list .card:hover,
+.blog.single .card:hover,
+.categories.list .card:hover,
+.tags.list .card:hover {
transform: scale(1.025);
}
+.contributors.list .card.card-terms:hover,
+.categories.list .card.card-terms:hover,
+.tags.list .card.card-terms:hover {
+ transform: none;
+}
+
.home .card-body,
.contributors.list .card-body,
-.blog.list .card-body {
+.blog.list .card-body,
+.blog.single .card-body,
+.categories.list .card-body,
+.tags.list .card-body {
padding: 0 2rem 1rem;
}
+.contributors.list .card-terms .card-body,
+.categories.list .card-terms .card-body,
+.tags.list .card-terms .card-body {
+ padding: 1rem;
+}
+
.blog-header {
text-align: center;
margin-bottom: 2rem;
@@ -26,3 +47,11 @@
.blog-footer {
text-align: center;
}
+
+.related-posts {
+ margin-top: 4rem;
+}
+
+h2.section-title {
+ margin-bottom: 1.25rem;
+}
diff --git a/config/_default/config.toml b/config/_default/config.toml
index 75d4703..b6a1f4e 100644
--- a/config/_default/config.toml
+++ b/config/_default/config.toml
@@ -59,6 +59,8 @@ rel = "sitemap"
[taxonomies]
contributor = "contributors"
+ category = "categories"
+ tag = "tags"
[permalinks]
blog = "/blog/:title/"
@@ -67,6 +69,20 @@ rel = "sitemap"
[minify.tdewolff.html]
keepWhitespace = false
+[related]
+ threshold = 80
+ includeNewer = true
+ toLower = false
+ [[related.indices]]
+ name = "categories"
+ weight = 100
+ [[related.indices]]
+ name = "tags"
+ weight = 80
+ [[related.indices]]
+ name = "date"
+ weight = 10
+
[module]
[module.hugoVersion]
extended = true
diff --git a/config/_default/params.toml b/config/_default/params.toml
index d80b6cb..2eb69ac 100644
--- a/config/_default/params.toml
+++ b/config/_default/params.toml
@@ -60,6 +60,10 @@ imageImageSizes = ["480","720","1080","1280","1600","2048"]
singleSize = false
imageAddClass = "img-fluid lazyload blur-up"
+### Image template
+defaultImage = "default-image.png" # put in `./assets/images/`
+fillImage = "1270x740 Center" # normalize image size
+
# Footer
footer = "Powered by <a class=\"text-muted\" href=\"https://www.netlify.com/\">Netlify</a>, <a class=\"text-muted\" href=\"https://gohugo.io/\">Hugo</a>, and <a class=\"text-muted\" href=\"https://getdoks.org/\">Doks</a>"
diff --git a/content/en/blog/say-hello-to-doks/index.md b/content/en/blog/say-hello-to-doks/index.md
index e9c3185..d14d357 100644
--- a/content/en/blog/say-hello-to-doks/index.md
+++ b/content/en/blog/say-hello-to-doks/index.md
@@ -1,11 +1,17 @@
---
title: "Say hello to Doks 👋"
description: "Introducing Doks, a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
-lead: "Introducing Doks, a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
+excerpt: "Introducing Doks, a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
date: 2020-11-04T09:19:42+01:00
lastmod: 2020-11-04T09:19:42+01:00
draft: false
weight: 50
-images: ["say-hello-to-doks.png"]
+images: []
+categories: ["News"]
+tags: ["security", "performance", "SEO"]
contributors: ["Henk Verlinde"]
+pinned: false
+homepage: false
---
+
+Introducing Doks, a Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default.
diff --git a/content/en/blog/say-hello-to-doks/say-hello-to-doks.png b/content/en/blog/say-hello-to-doks/say-hello-to-doks.png
deleted file mode 100644
index 70d8c78..0000000
--- a/content/en/blog/say-hello-to-doks/say-hello-to-doks.png
+++ /dev/null
Binary files differ
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 1401ccd..2778b20 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,13 +1,32 @@
{{ define "main" }}
<div class="row justify-content-center">
- <div class="col-md-12 col-lg-10 col-xl-8">
- {{ range .Paginator.Pages }}
- <article>
- <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
- {{ .Description }}
- </article>
- {{ end }}
- {{ template "_internal/pagination.html" . }}
+ <div class="col-md-12 col-lg-9">
+ <h1 class="text-center">{{ .Title }}</h1>
+ {{ with .Content -}}<div class="text-center">{{ . }}</div>{{ end -}}
+ </div>
+</div>
+<div class="row row-cols-1 row-cols-lg-2 g-lg-5">
+ {{ $paginator := .Paginate (.Data.Pages) -}}
+ {{ range $paginator.Pages -}}
+ <div class="col">
+ <div class="card">
+ {{- .Scratch.Set "fillImage" "1270x620 Center" -}}
+ {{ partial "content/card-image.html" . }}
+ <div class="card-body">
+ <article>
+ <h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
+ <p>{{ .Params.excerpt | safeHTML }}</p>
+ {{ partial "main/blog-meta.html" . -}}
+ </article>
+ </div>
+ </div>
+ </div>
+ {{ end -}}
+</div>
+<div class="row justify-content-center">
+ <div class="col-md-12 col-lg-9">
+ {{ $.Scratch.Set "paginator" true }}
+ {{ template "_internal/pagination.html" . }}
</div>
</div>
{{ end }} \ No newline at end of file
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html
new file mode 100644
index 0000000..73fdeb8
--- /dev/null
+++ b/layouts/_default/terms.html
@@ -0,0 +1,20 @@
+{{ define "main" }}
+<div class="row justify-content-center">
+ <div class="col-md-12 col-lg-10 col-xl-8">
+ <h1 class="text-center">{{ .Title }}</h1>
+ <div class="text-center">{{ .Content }}</div>
+ <div class="card-list">
+ {{ range .Paginator.Pages }}
+ <div class="card card-terms my-3">
+ <div class="card-body">
+ <article>
+ <a class="stretched-link" href="{{ .RelPermalink }}">{{ .Params.title | title }} &rarr;</a>
+ </article>
+ </div>
+ </div>
+ {{ end }}
+ </div>
+ {{ template "_internal/pagination.html" . }}
+ </div>
+</div>
+{{ end }}
diff --git a/layouts/blog/list.html b/layouts/blog/list.html
deleted file mode 100644
index 9695387..0000000
--- a/layouts/blog/list.html
+++ /dev/null
@@ -1,24 +0,0 @@
-{{ define "main" }}
-<div class="row justify-content-center">
- <div class="col-md-12 col-lg-10 col-xl-8">
- <article>
- <h1 class="text-center">{{ .Title }}</h1>
- <div class="text-center">{{ .Content }}</div>
- <div class="card-list">
- {{ $paginator := .Paginate (.Data.Pages) -}}
- {{ range $paginator.Pages -}}
- <div class="card">
- <div class="card-body">
- <h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
- <p>{{ .Params.lead | safeHTML }}</p>
- {{ partial "main/blog-meta.html" . -}}
- </div>
- </div>
- {{ end -}}
- {{ $.Scratch.Set "paginator" true }}
- {{ template "_internal/pagination.html" . }}
- </div>
- </article>
- </div>
-</div>
-{{ end }} \ No newline at end of file
diff --git a/layouts/blog/single.html b/layouts/blog/single.html
index 48fdb82..178fe31 100644
--- a/layouts/blog/single.html
+++ b/layouts/blog/single.html
@@ -1,14 +1,59 @@
{{ define "main" }}
+<article>
<div class="row justify-content-center">
- <div class="col-md-12 col-lg-10 col-xl-8">
- <article>
- <div class="blog-header">
- <h1>{{ .Title }}</h1>
- {{ partial "main/blog-meta.html" . }}
+ <div class="col-md-12 col-lg-10">
+ <div class="blog-header">
+ <h1>{{ .Title }}</h1>
+ {{ partial "main/blog-meta.html" . }}
+ </div>
+ </div>
+ <div class="col-md-13">
+ <div class="mt-n4">
+ {{- .Scratch.Set "fillImage" "1270x715 Center" -}}
+ {{ partial "content/figure.html" . }}
+ </div>
+ </div>
+ <div class="col-md-12 col-lg-9">
+ {{ .Content }}
+ {{ if .Params.tags -}}
+ <div class="mt-4">
+ {{ range $index, $tag := .Params.tags -}}
+ <a class="btn btn-light" href="{{ "/tags/" | absURL }}{{ . | urlize }}/" role="button">{{ . }}</a>
+ {{ end -}}
+ </div>
+ {{ end -}}
+ </div>
+</div>
+</article>
+
+{{ $related := .Site.RegularPages.Related . | first 3 -}}
+{{ with $related -}}
+<div class="related-posts">
+<div class="row justify-content-center">
+ <div class="col">
+ <h2 class="section-title">Related posts</h2>
+ </div>
+</div>
+<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-lg-5">
+ {{ range . -}}
+ <div class="col">
+ <div class="card">
+ {{- .Scratch.Set "fillImageCard" "1270x620 Center" -}}
+ {{ partial "content/card-image.html" . }}
+ <div class="card-body">
+ <article>
+ <h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
+ <p>{{ .Params.excerpt | safeHTML }}</p>
+ {{ partial "main/blog-meta.html" . -}}
+ </article>
</div>
- <p class="lead">{{ .Params.lead | safeHTML }}</p>
- {{ .Content }}
- </article>
+ </div>
</div>
+ {{ end -}}
+</div>
</div>
-{{ end }} \ No newline at end of file
+{{ end -}}
+
+{{ end }}
+
+
diff --git a/layouts/contributors/list.html b/layouts/contributors/list.html
deleted file mode 100644
index adc53aa..0000000
--- a/layouts/contributors/list.html
+++ /dev/null
@@ -1,23 +0,0 @@
-{{ define "main" }}
-<div class="row justify-content-center">
- <div class="col-md-12 col-lg-10 col-xl-8">
- <article>
- <h1 class="text-center">{{ .Title }}</h1>
- <div class="text-center">{{ .Content }}</div>
- <div class="card-list">
- {{ range .Data.Pages -}}
- <div class="card">
- <div class="card-body">
- <h2 class="h3"><a class="stretched-link text-body" href="{{ .RelPermalink }}">{{ .Params.title }}</a></h2>
- {{ if eq .Section "blog" -}}
- <p>{{ .Params.lead | safeHTML }}</p>
- {{ partial "main/blog-meta.html" . -}}
- {{ end -}}
- </div>
- </div>
- {{ end -}}
- </div>
- </article>
- </div>
-</div>
-{{ end }} \ No newline at end of file
diff --git a/layouts/partials/content/card-image.html b/layouts/partials/content/card-image.html
new file mode 100644
index 0000000..7a3a43e
--- /dev/null
+++ b/layouts/partials/content/card-image.html
@@ -0,0 +1,22 @@
+{{ $fillImage := .Scratch.Get "fillImageCard" }}
+{{ if not $fillImage -}}
+ {{ $fillImage = site.Params.fillImage }}
+{{ end -}}
+
+{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
+{{ if not $image -}}
+ {{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
+{{ end -}}
+
+{{ $webp := printf "%s%s" $fillImage " webp" }}
+{{ $image = $image.Resize $webp}}
+
+{{ $lqip := $image.Resize site.Params.lqipWidth -}}
+
+<img
+ class="card-img-top img-fluid lazyload blur-up"
+ src="{{ $lqip.Permalink }}"
+ data-src="{{ $image.Permalink }}"
+ width="{{ $image.Width }}"
+ height="{{ $image.Height }}"
+ alt="{{ .Title }}">
diff --git a/layouts/partials/content/figure.html b/layouts/partials/content/figure.html
new file mode 100644
index 0000000..fbb0bde
--- /dev/null
+++ b/layouts/partials/content/figure.html
@@ -0,0 +1,37 @@
+{{ $fillImage := .Scratch.Get "fillImage" }}
+{{ if not $fillImage -}}
+ {{ $fillImage = site.Params.fillImage }}
+{{ end -}}
+
+{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
+{{ if not $image -}}
+ {{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
+{{ end -}}
+
+{{ $image = $image.Fill $fillImage }}
+{{ $lqip := $image.Resize site.Params.lqipWidth -}}
+
+{{ $imgSrc := "" -}}
+{{ $imgSrcSet := slice -}}
+
+{{ $widths := site.Params.landscapePhotoWidths -}}
+{{ if gt $image.Height $image.Width -}}
+ {{ $widths = site.Params.portraitPhotoWidths -}}
+{{ end -}}
+
+{{ range $widths -}}
+ {{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}}
+ {{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}}
+ {{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}}
+{{ end -}}
+{{ $imgSrcSet = (delimit $imgSrcSet ",") -}}
+
+{{ if gt $image.Width site.Params.smallLimit -}}
+ <figure class="figure">
+ <img class="figure-img img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
+ <noscript><img class="figure-img img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}"></noscript>
+ <!-- {{ with .Title }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end -}} -->
+ </figure>
+{{ else -}}
+ <img class="img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
+{{ end -}}
diff --git a/layouts/partials/content/image.html b/layouts/partials/content/image.html
new file mode 100644
index 0000000..2772531
--- /dev/null
+++ b/layouts/partials/content/image.html
@@ -0,0 +1,32 @@
+{{ $image := .Resources.GetMatch (printf "**%s" (index .Params.images 0)) }}
+{{ if not $image -}}
+ {{ $image = resources.Get (printf "%s%s" "images/" site.Params.defaultImage) }}
+{{ end -}}
+
+{{ $image = $image.Fill site.Params.fillImage }}
+{{ $lqip := $image.Resize site.Params.lqipWidth -}}
+
+{{ $imgSrc := "" -}}
+{{ $imgSrcSet := slice -}}
+
+{{ $widths := site.Params.landscapePhotoWidths -}}
+{{ if gt $image.Height $image.Width -}}
+ {{ $widths = site.Params.portraitPhotoWidths -}}
+{{ end -}}
+
+{{ range $widths -}}
+ {{ $srcUrl := (printf "%dx" . | $image.Resize).Permalink -}}
+ {{ if eq $imgSrc "" -}}{{ $imgSrc = $srcUrl -}}{{ end -}}
+ {{ $imgSrcSet = $imgSrcSet | append (printf "%s %dw" $srcUrl .) -}}
+{{ end -}}
+{{ $imgSrcSet = (delimit $imgSrcSet ",") -}}
+
+{{ if gt $image.Width site.Params.smallLimit -}}
+ <figure class="figure">
+ <img class="figure-img img-fluid lazyload blur-up" data-sizes="auto" src="{{ $lqip.Permalink }}" data-srcset="{{ $imgSrcSet }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
+ <noscript><img class="figure-img img-fluid" sizes="100vw" srcset="{{ $imgSrcSet }}" src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}"></noscript>
+ <!-- {{ with .Title }}<figcaption class="figure-caption">{{ . | safeHTML }}</figcaption>{{ end -}} -->
+ </figure>
+{{ else -}}
+ <img class="img-fluid lazyload blur-up" src="{{ $lqip.Permalink }}" data-src="{{ $image.Permalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ .Title }}">
+{{ end -}}
diff --git a/layouts/partials/header/header.html b/layouts/partials/header/header.html
index d6e0f6e..93584f4 100644
--- a/layouts/partials/header/header.html
+++ b/layouts/partials/header/header.html
@@ -53,7 +53,7 @@
{{- $active := or ($current.IsMenuCurrent "main" .) ($current.HasMenuCurrent "main" .) -}}
{{- $active = or $active (eq .Name $current.Title) -}}
{{- $active = or $active (and (eq .Name ($section | humanize)) (eq $current.Section $section)) -}}
- {{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "contributors")) -}}
+ {{- $active = or $active (and (eq .Name "Blog") (eq $current.Section "blog" "contributors" "categories" "tags")) -}}
{{ if .HasChildren }}
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle ps-0 py-1" href="#" id="navbarDropdownMenuLink" role="button" data-bs-toggle="dropdown" aria-expanded="false">
diff --git a/layouts/partials/main/blog-meta.html b/layouts/partials/main/blog-meta.html
index d3cc3b7..7d11e94 100644
--- a/layouts/partials/main/blog-meta.html
+++ b/layouts/partials/main/blog-meta.html
@@ -1,2 +1,2 @@
{{ $last := sub (len .Params.contributors) 1 }}
-<p><small>Posted {{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }}{{ if eq $index $last }} and {{ else }}, {{ end }}{{ end }}<a class="stretched-link position-relative" href="{{ "/contributors/" | relURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}}&nbsp;&hyphen;&nbsp;<strong>{{ .ReadingTime -}}&nbsp;min read</strong></small><p>
+<p><small>Posted{{ if .Params.categories -}}&nbsp;in&nbsp;{{ range $index, $category := .Params.categories -}}{{ if gt $index 0 -}}, {{ end -}}<a class="stretched-link position-relative link-muted" href="{{ "/categories/" | absURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}}&nbsp;on&nbsp;{{ .PublishDate.Format "January 2, 2006" }} by {{ if .Params.contributors -}}{{ range $index, $contributor := .Params.contributors }}{{ if gt $index 0 }}{{ if eq $index $last }} and {{ else }}, {{ end }}{{ end }}<a class="stretched-link position-relative" href="{{ "/contributors/" | relURL }}{{ . | urlize }}/">{{ . }}</a>{{ end -}}{{ end -}}&nbsp;&hyphen;&nbsp;<strong>{{ .ReadingTime -}}&nbsp;min read</strong></small><p> \ No newline at end of file