Update Hugo version

master
Maik de Kruif 3 weeks ago
parent fd70e7a0fa
commit ffd9b46bd8
No known key found for this signature in database
GPG Key ID: DB1A8C782DD43CB3
  1. 13
      archetypes/default.md
  2. 13
      archetypes/posts.md
  3. 40
      config/_default/hugo.toml
  4. 5
      config/production/hugo.toml
  5. 2
      content/portfolio/watch-together.md
  6. 13
      themes/maik-blog/archetypes/posts.md
  7. 3
      themes/maik-blog/layouts/_default/baseof.html
  8. 10
      themes/maik-blog/layouts/_default/rss.xml
  9. 6
      themes/maik-blog/layouts/partials/footer.html
  10. 7
      themes/maik-blog/layouts/partials/head.html
  11. 6
      themes/maik-blog/layouts/partials/javascript.html
  12. 8
      themes/maik-blog/layouts/partials/meta-tags.html
  13. 47
      themes/maik-blog/layouts/partials/seo.html
  14. 2
      themes/maik-blog/layouts/portfolio/single.html
  15. 2
      themes/maik-blog/layouts/posts/single.html
  16. 10
      themes/maik-blog/layouts/rss.xml
  17. 3
      themes/maik-blog/layouts/writeups/list.html
  18. 45
      themes/maik-blog/layouts/writeups/rss.xml
  19. 2
      themes/maik-blog/layouts/writeups/single.html

@ -1,13 +0,0 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
images = []
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++

@ -1,13 +0,0 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
images = []
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++

@ -1,12 +1,8 @@
baseURL = "https://maik.dev/"
# baseURL = "http://localhost:1313/"
baseURL = "http://localhost:1313/"
title = "Maik de Kruif"
languageCode = "en-us"
theme = "maik-blog"
paginate = 12
rssLimit = 10
copyright = "© Maik de Kruif (maik_dev). All rights reserved."
PygmentsCodeFences = true
@ -27,31 +23,21 @@ canonifyURLs = true
enableRobotsTXT = true
enableGitInfo = true
enableEmoji = true
enableMissingTranslationPlaceholders = false
disableRSS = false
disableSitemap = false
disable404 = false
disableHugoGeneratorInject = false
googleAnalytics = "UA-136337666-1"
[permalinks]
[permalinks.page]
posts = "/posts/:title/"
writeups = "/:sections/:title/"
[author]
name = "Maik de Kruif"
email = "maik@maik.dev"
twitter = "@maik_dev"
image = "/img/home/portrait.png"
[social]
twitter = "@maik_dev"
# writeups = "/writeups/:title/"
portfolio = "/portfolio/:title/"
[outputs]
home = ["HTML", "RSS"]
page = ["HTML", "RSS"]
[pagination]
pagerSize = 12
[params]
dateform = "Jan 2, 2006"
dateformShort = "Jan 2"
@ -65,6 +51,8 @@ googleAnalytics = "UA-136337666-1"
genre = "Blog"
rssLimit = 15
showReadingTimeInList = false
homeSubtitle = "Software Engineering, Linux and Cyber Security"
@ -111,6 +99,15 @@ googleAnalytics = "UA-136337666-1"
alt = "Portrait"
size = "175px"
[params.author]
name = "Maik de Kruif"
email = "maik@maik.dev"
twitter = "@maik_dev"
image = "/img/home/portrait.png"
[params.general]
twitter = "@maik_dev"
# Wallets
[[params.wallets]]
name = "XMR"
@ -175,7 +172,6 @@ googleAnalytics = "UA-136337666-1"
[languages]
[languages.en]
subtitle = "maik.dev"
weight = 1
copyright = "© Maik de Kruif (maik_dev). All rights reserved."

@ -0,0 +1,5 @@
baseURL = "https://maik.dev/"
[services]
[services.googleAnalytics]
id = "UA-136337666-1"

@ -2,7 +2,7 @@
author = "Maik de Kruif"
title = "WatchTogether"
start_date = 2018-08-17
end_date = 9999-01-01
end_date = 2021-01-25
company_name = "Personal"
company_url = "https://maik.dev"
cover = "img/portfolio/watch-together/screenshot.png"

@ -1,13 +0,0 @@
+++
author = "Maik de Kruif"
title = "{{ replace .Name "-" " " | title }}"
date = {{ .Date }}
description = ""
cover = ""
tags = [
"untagged",
]
categories = [
"uncategorized",
]
+++

@ -1,4 +1,3 @@
{{- $paginator := .Paginate .RegularPagesRecursive }}
<!DOCTYPE html>
<html lang="{{ .Site.Language }}">
@ -20,6 +19,8 @@
</div>
{{ partial "javascript.html" . }}
<!-- SEO stuff -->
{{ partial "seo.html" . }}
</body>
</html>

@ -7,11 +7,11 @@
{{- with .Site.LanguageCode }}
<language>{{.}}</language>
{{- end }}
{{- with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
{{- with .Site.Params.author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor>
{{- end }}
{{- with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>
{{- with .Site.Params.author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster>
{{- end }}
{{- with .Site.Copyright }}
<copyright>{{.}}</copyright>
@ -22,7 +22,7 @@
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{ range .Pages | first 15 }}
{{ range .Pages | first .Site.Params.rssLimit }}
<item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>
<link>{{ .Permalink }}</link>

@ -3,19 +3,17 @@
<div class="footer__content">
<div class="footer__content__section regular">
<span>&copy; {{ now.Format "2006" }}</span>
{{- if .Site.Author.name }}
<span><a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a></span>
{{- if .Site.Params.author.name }}
<span><a href="{{ .Site.BaseURL }}">{{ .Site.Params.author.name }}</a></span>
{{- end }}
{{- if .Site.Copyright }}
<span>All rights reserved.</span>
{{- end }}
<span><a href="/privacy/">Privacy</a></span>
<span>
{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }}
<a href="{{ "index.xml" | absLangURL }}" target="_blank" title="rss">
{{ partial "svg.html" (dict "name" "rss") }}
</a>
{{- end }}
</span>
</div>
<div class="footer__content__section donations">

@ -10,11 +10,11 @@
crossorigin="anonymous">
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{- $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Fingerprint }}
{{- $style := resources.Get "scss/main.scss" | css.Sass $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ $options := (dict "targetPath" "syntax_highlighting.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{- $style := resources.Get "scss/syntax_highlighting.scss" | resources.ToCSS $options | resources.Fingerprint }}
{{- $style := resources.Get "scss/syntax_highlighting.scss" | css.Sass $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{- range $val := $.Site.Params.customCSS }}
@ -28,9 +28,6 @@
<!-- Meta tags -->
{{- partial "meta-tags.html" . -}}
<!-- SEO stuff -->
{{- partial "seo.html" . -}}
<!-- RSS -->
<!-- {{- with .OutputFormats.Get "rss" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}

@ -5,9 +5,9 @@
{{- $secureJS := slice $main $menu $theme $nav | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
<script type="text/javascript" src="{{ $secureJS.Permalink }}" integrity="{{ $secureJS.Data.Integrity }}"></script>
{{- if .Site.GoogleAnalytics }}
{{- if .Site.Config.Services.GoogleAnalytics.ID }}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.GoogleAnalytics }}"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id={{ .Site.Config.Services.GoogleAnalytics.ID }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
@ -16,7 +16,7 @@
}
gtag('js', new Date());
gtag('config', '{{ .Site.GoogleAnalytics }}');
gtag('config', '{{ .Site.Config.Services.GoogleAnalytics.ID }}');
</script>
{{- end }}

@ -1,6 +1,6 @@
<!-- Default -->
<meta name="author"
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ end }}{{ end }}">
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Params.author.name }}{{ . }}{{ end }}{{ end }}">
<meta name="description"
content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ .Params.description | plainify }}{{ end }}" />
<meta name="keywords"
@ -26,7 +26,7 @@
<!-- Article -->
<meta property="article:publisher" content="{{ .Site.BaseURL }}" />
<meta name="article:author"
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ end }}{{ end }}">
content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ with .Site.Params.author.name }}{{ . }}{{ end }}{{ end }}">
{{- if isset .Params "date" }}
<meta property="article:published_time" content="{{ time .Date }}" />
@ -60,9 +60,9 @@
<meta name="twitter:description"
content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" />
<meta name="twitter:url" content="{{ .Permalink }}" />
{{- with .Site.Social.twitter }}
{{- with .Site.Params.general.twitter }}
<meta name="twitter:site" content="{{ . }}" />
{{- end }}
{{- with .Site.Author.twitter }}
{{- with .Site.Params.author.twitter }}
<meta name="twitter:creator" content="{{ . }}" />
{{- end }}

@ -1,10 +1,9 @@
{{- /* <!-- Breadcrumbs --> */}}
{{- $visiblePage := .}}
{{- $breadcrumbs := slice }}
{{- $path := "" }}
{{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (eq .Kind "404")) }}
{{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (or (eq .Kind "404") (.File))) }}
{{- $path = .RelPermalink }}
{{- else if .File }}
{{- $path = string .File }}
{{- else if .IsHome }}
{{- $path = "" }}
{{- else }}
@ -22,10 +21,10 @@
{{- $breadcrumbs = $breadcrumbs | append (dict "name" "Not Found" "url" (printf "%s%s" $.Site.BaseURL (strings.TrimLeft "/" $currentPath))) }}
{{- else }}
{{- $title := $page.Title }}
{{- if eq $page $ }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink) }}
{{- if eq (trim $currentPath "/") $path }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $visiblePage.Title "url" $visiblePage.Permalink) }}
{{- else }}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink)}}
{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink) }}
{{- end }}
{{- end }}
{{- end }}
@ -39,11 +38,11 @@
{
"@type": "Person",
"@id": "{{ $.Site.BaseURL }}#website_founder",
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Author.image }}
{{- with $.Site.Params.author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {
@ -57,7 +56,7 @@
},
{
"@type": "Organization",
"name": {{ $.Site.Author.name | safeHTML }},
"name": {{ $.Site.Params.author.name | safeHTML }},
"slogan": {{$.Site.Params.HomeSubtitle | safeHTML }},
{{- with $socials := .Site.Params.social }}
"sameAs": [
@ -66,10 +65,10 @@
{{- end }}
],
{{- end }}
{{- with $.Site.Author.email }}
{{- with $.Site.Params.author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Author.image }}
{{- with $.Site.Params.author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"logo": {
@ -108,15 +107,15 @@
{{- with .Site.Copyright }}
"license": {{ . | safeHTML }},
{{- end }}
{{- if .Site.Author.name }}
{{- if .Site.Params.author.name }}
{{- range slice "publisher" "author" }}
{{ . }}: {
"@type": "Person",
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Author.image }}
{{- with $.Site.Params.author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {
@ -187,15 +186,15 @@
{{- with .Site.Copyright }}
"license": {{ . | safeHTML }},
{{- end }}
{{- if .Site.Author.name }}
{{- if .Site.Params.author.name }}
{{- range slice "publisher" "author" }}
{{ . }}: {
"@type": "Person",
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Author.image }}
{{- with $.Site.Params.author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {
@ -258,15 +257,15 @@
{{- with .Site.Copyright }}
"license": {{ . | safeHTML }},
{{- end }}
{{- if .Site.Author.name }}
{{- if .Site.Params.author.name }}
{{- range slice "publisher" "author" }}
{{ . }}: {
"@type": "Person",
"name": {{ $.Site.Author.name | safeHTML }},
{{- with $.Site.Author.email }}
"name": {{ $.Site.Params.author.name | safeHTML }},
{{- with $.Site.Params.author.email }}
"email": {{ . | safeHTML }},
{{- end }}
{{- with $.Site.Author.image }}
{{- with $.Site.Params.author.image }}
{{- $img := resources.Get . }}
{{- $img = $img.Resize (printf "%dx%d png" $img.Width $img.Height) }}
"image": {

@ -144,7 +144,7 @@
{{- end }}
{{- if .Site.DisqusShortname }}
{{- if .Site.Config.Services.Disqus.Shortname }}
{{- if not (eq .Params.Comments "false") }}
<div id="comments">
{{ template "_internal/disqus.html" . }}

@ -152,7 +152,7 @@
{{- end }}
{{- if .Site.DisqusShortname }}
{{- if .Site.Config.Services.Disqus.Shortname }}
{{- if not (eq .Params.Comments "false") }}
<div id="comments">
{{ template "_internal/disqus.html" . }}

@ -7,11 +7,11 @@
{{- with .Site.LanguageCode }}
<language>{{.}}</language>
{{- end }}
{{- with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>
{{- with .Site.Params.author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor>
{{- end }}
{{- with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>
{{- with .Site.Params.author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster>
{{- end }}
{{- with .Site.Copyright }}
<copyright>{{.}}</copyright>
@ -27,7 +27,7 @@
{{- $allContent = union $allContent .RegularPagesRecursive }}
{{- end }}
{{- $allContent = sort $allContent "Date" "desc" }}
{{- $allContent = $allContent | first 15 }}
{{- $allContent = $allContent | first .Site.Params.rssLimit }}
{{- range $allContent }}
<item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>

@ -1,4 +1,5 @@
{{ define "main" }}
{{ $paginator := (.Paginate .RegularPagesRecursive) }}
<main class="posts">
<h1>{{ .Title }}</h1>
@ -12,7 +13,7 @@
{{- end }}
<div class="posts-list masonry">
{{ range .Paginator.Pages }}
{{ range $paginator.Pages }}
<div class="post masonry-item">
<div class="masonry-item-content">
<h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>

@ -0,0 +1,45 @@
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<icon>{{"favicon-32x32.png" | absURL}}</icon>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
{{- with .Site.LanguageCode }}
<language>{{.}}</language>
{{- end }}
{{- with .Site.Params.author.email }}
<managingEditor>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</managingEditor>
{{- end }}
{{- with .Site.Params.author.email }}
<webMaster>{{.}}{{ with $.Site.Params.author.name }} ({{.}}){{end}}</webMaster>
{{- end }}
{{- with .Site.Copyright }}
<copyright>{{.}}</copyright>
{{- end }}
{{- if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>
{{- end }}
{{- with .OutputFormats.Get "RSS" }}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end }}
{{ range .RegularPagesRecursive | first .Site.Params.rssLimit }}
<item>
<title>{{ .Title }}{{ with .Params.Subtitle }} // {{ . }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
<published>{{ .Date.Format "2006-01-02T15:04:05Z0700" | safeHTML }}</published>
{{- if .GitInfo }}
<updated>{{ dateFormat "2006-01-02T15:04:05Z0700" .GitInfo.AuthorDate.Local | safeHTML }}</updated>
{{- end }}
<author>{{ .Params.author }}</author>
<guid isPermaLink="true">{{ .Permalink }}</guid>
<description>{{ printf `<![CDATA[%s]]>` .Params.description | safeHTML }}</description>
{{ $content := .Content}}
{{- if .Params.Cover }}
{{- $content = (printf `%s%s` (partial "image.html" (dict "path" .Params.Cover "alt" (.Title | plainify) "class" "post-cover")) $content) }}
{{- end }}
<content:encoded type="html">{{ printf `<![CDATA[%s]]>` $content | safeHTML }}</content:encoded>
</item>
{{ end }}
</channel>
</rss>

@ -152,7 +152,7 @@
{{- end }}
{{- if .Site.DisqusShortname }}
{{- if .Site.Config.Services.Disqus.Shortname }}
{{- if not (eq .Params.Comments "false") }}
<div id="comments">
{{ template "_internal/disqus.html" . }}

Loading…
Cancel
Save