Merge remote-tracking branch 'origin/master'

This commit is contained in:
Michael Romero 2019-09-20 22:53:38 -07:00
commit 9a7716ef43
4 changed files with 21 additions and 8 deletions

View File

@ -34,6 +34,12 @@ url = "https://twitter.com/%s"
title = "Twitter"
icon = "fab fa-twitter"
[[social_icons]]
id = "slack"
url = "https://%s.slack.com/"
title = "Slack"
icon = "fab fa-slack"
[[social_icons]]
id = "reddit"
url = "https://reddit.com/u/%s"

View File

@ -68,8 +68,9 @@ pygmentsCodefencesGuessSyntax = true
paypal = "username"
telegram = "username"
500px = "username"
weibo = "username"
mastodon = "url"
weibo = "username"
slack = "username"
[[menu.main]]
name = "Blog"

View File

@ -8,6 +8,7 @@
{{ block "header" . }}{{ partial "header.html" . }}{{ end }}
{{ block "main" . }}{{ end }}
{{ partial "footer.html" . }}
{{ block "footer" . }}{{ end }}
</body>
</html>

View File

@ -23,14 +23,19 @@
{{ end }}
{{ if .Site.Params.showRelatedPosts }}
{{ $related := .Site.RegularPages.Related . | first 3 }}
{{ with $related }}
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
{{ $.Scratch.Set "has_related" true }}
{{ end }}
</ul>
{{ if $.Scratch.Get "has_related" }}
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
<ul>
{{ $num_to_show := .Site.Params.related_content_limit | default 5 }}
{{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
</article>