diff --git a/config.toml b/config.toml
index 9f98a93..d18d33e 100644
--- a/config.toml
+++ b/config.toml
@@ -2,7 +2,6 @@ baseURL = "https://maik.dev/"
# baseURL = "http://localhost:1313/"
title = "Maik de Kruif"
languageCode = "en-us"
-# theme = "hello-friend-ng"
theme = "maik-blog"
paginate = 6
@@ -25,7 +24,7 @@ buildExpired = false
canonifyURLs = true
enableRobotsTXT = true
-enableGitInfo = false
+enableGitInfo = true
enableEmoji = true
enableMissingTranslationPlaceholders = false
disableRSS = false
@@ -40,6 +39,14 @@ googleAnalytics = "UA-136337666-1"
[author]
name = "Maik de Kruif"
+ twitter = "@maik_dev"
+
+[social]
+ twitter = "@maik_dev"
+
+[outputs]
+ home = ["HTML", "AMP", "RSS"]
+ page = ["HTML", "AMP", "RSS"]
[params]
dateform = "Jan 2, 2006"
@@ -57,7 +64,7 @@ googleAnalytics = "UA-136337666-1"
homeSubtitle = "Maik de Kruif (maik_dev)"
# Prefix of link to the git commit detail page. GitInfo must be enabled.
- # gitUrl = ""
+ gitUrl = "https://github.com/maikka39/Personal-Website/commit/"
# Set disableReadOtherPosts to true in order to hide the links to other posts.
disableReadOtherPosts = false
@@ -66,7 +73,9 @@ googleAnalytics = "UA-136337666-1"
# There are a lot of buttons preconfigured. If you want to change them,
# generate the buttons here: https://sharingbuttons.io
# and add them into your own `layouts/partials/sharing-buttons.html`
+ # Preconfigured: facebook, twitter, tumblr, email, pinterest, linkedin, reddit, xing, whatsapp, hackernews, telegram
enableSharingButtons = true
+ sharingButtons = ["twitter", "email", "linkedin", "reddit", "whatsapp", "telegram"]
# Integrate Javascript files or stylesheets by adding the url to the external assets or by
# linking local files with their path relative to the static folder, e.g. "css/styles.css"
@@ -97,10 +106,10 @@ googleAnalytics = "UA-136337666-1"
# logoCursorAnimate = "2s"
# Uncomment this if you want a portrait on your start page
- # [params.portrait]
- # path = "/img/image.jpg"
- # alt = "Portrait"
- # maxWidth = "50px"
+ [params.portrait]
+ path = "/img/home/portrait.png"
+ alt = "Portrait"
+ size = "175px"
# Social icons
[[params.social]]
@@ -163,7 +172,7 @@ googleAnalytics = "UA-136337666-1"
[languages.en]
subtitle = "maik.dev"
weight = 1
- copyright = 'All rights reserved.'
+ copyright = "© Maik de Kruif (maik_dev). All rights reserved."
[menu]
[[menu.main]]
diff --git a/content/posts/adventofctf/challenge_6.md b/content/posts/adventofctf/challenge_6.md
index e896e7a..4b7f0ac 100644
--- a/content/posts/adventofctf/challenge_6.md
+++ b/content/posts/adventofctf/challenge_6.md
@@ -254,13 +254,13 @@ This query also has to be converted to an input first. This will become `' UNION
After submitting this input, I got the flag: `NOVI{7h1s_flag_w@s_chuncky_right}`.
-\*Note: this only works if a table has only one column, if it has more, you have to get the columns first. See the [Getting the secrets](#optional-getting-the-secrets-) for more info about that.
+\*Note: this only works if a table has only one column, if it has more, you have to get the columns first. See the [Getting the secrets]({{< ref "#getting-the-secrets" >}}) for more info about that.
This flag can then be submitted for the [challenge](https://ctfd.adventofctf.com/challenges#6-7).
-_For more information about how SQL injection works, please read my [previous post](/posts/2020/12/challenge-5-adventofctf/)._
+_For more information about how SQL injection works, please read my [previous post]({{< ref "challenge_5.md" >}})._
-## (Optional) Getting the secrets 😋
+## (Optional) Getting the secrets 😋 {#getting-the-secrets}
Because the `secrets` table a more than one column, we need to know the column names first. We can get them with the following query:
diff --git a/static/img/home/portrait.png b/static/img/home/portrait.png
new file mode 100644
index 0000000..6f94f4a
Binary files /dev/null and b/static/img/home/portrait.png differ
diff --git a/themes/maik-blog/layouts/_default/baseof.html b/themes/maik-blog/layouts/_default/baseof.html
index 9d9a5a9..7588d8f 100644
--- a/themes/maik-blog/layouts/_default/baseof.html
+++ b/themes/maik-blog/layouts/_default/baseof.html
@@ -10,12 +10,12 @@
{{ partial "header.html" . }}
- {{ block "main" . }}{{ end }}
+ {{- block "main" . }}{{ end -}}
- {{ block "footer" . }}
+ {{- block "footer" . }}
{{ partial "footer.html" . }}
- {{ end }}
+ {{- end }}
{{ partial "javascript.html" . }}
diff --git a/themes/maik-blog/layouts/_default/list.html b/themes/maik-blog/layouts/_default/list.html
index 95055c7..9f09bdf 100644
--- a/themes/maik-blog/layouts/_default/list.html
+++ b/themes/maik-blog/layouts/_default/list.html
@@ -4,74 +4,74 @@
{{ .Title }}
- {{ if .Content }}
+ {{- if .Content }}
{{ .Content }}
- {{ end }}
+ {{- end }}
- {{ if .Paginator.HasPrev }}
+ {{- if .Paginator.HasPrev }}
{{ partial "pagination.html" . }}
- {{ end }}
+ {{- end }}
{{ range $paginator.Pages }}
- {{ if .Date }}
+ {{- if .Date }}
{{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
-
- {{ end }}
- {{ with .Params.Author }}{{ $.Site.Params.WrittenBy | default "Written by" }}
- {{ . }} {{ end }}
- {{ if $.Site.Params.ShowReadingTimeInList }}
+ {{- end }}
+ {{- with .Params.Author }}
+ {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}
+ {{- end }}
+ {{- if $.Site.Params.ShowReadingTimeInList }}
— {{ .ReadingTime }}
{{ $.Site.Params.MinuteReadingTime | default "min read" }}
- {{ end }}
+ {{- end }}
- {{ if .Params.tags }}
+ {{- if .Params.tags }}
- {{ range .Params.tags }}
+ {{- range .Params.tags }}
#{{ . }}
- {{ end }}
+ {{- end }}
- {{ end }}
+ {{- end }}
- {{ if .Params.Cover }}
+ {{- if .Params.Cover }}
- {{ $img := imageConfig (printf "static/%s" .Params.Cover) }}
+ {{- $img := imageConfig (printf "static/%s" .Params.Cover) }}
- {{ if .Params.UseRelativeCover }}
+ {{- if .Params.UseRelativeCover }}
- {{ else }}
+ {{- else }}
- {{ end }}
+ {{- end }}
- {{ if .Params.CoverCaption }}
+ {{- if .Params.CoverCaption }}
{{ .Params.CoverCaption | markdownify }}
- {{ end }}
+ {{- end }}
- {{ end }}
+ {{- end }}
- {{ with .Description }}
+ {{- with .Description }}
{{ . | markdownify }}
- {{ else }}
- {{ if .Truncated }}
+ {{- else }}
+ {{- if .Truncated }}
{{ .Summary | markdownify }}
- {{ end }}
- {{ end }}
+ {{- end }}
+ {{- end }}
- {{ if not .Params.hideReadMore }}
+ {{- if not .Params.hideReadMore }}
- {{ end }}
+ {{- end }}
- {{ end }}
+ {{- end }}
{{ partial "pagination.html" . }}
diff --git a/themes/maik-blog/layouts/index.html b/themes/maik-blog/layouts/index.html
index e74a856..c9ea348 100644
--- a/themes/maik-blog/layouts/index.html
+++ b/themes/maik-blog/layouts/index.html
@@ -1,10 +1,10 @@
{{ define "main" }}
-
+
- {{ if .Site.Params.Portrait.Path }}
+ {{- if .Site.Params.Portrait.Path }}
- {{ end }}
+ style="max-width:{{ .Site.Params.Portrait.Size }}" />
+ {{- end }}
{{ .Site.Title }}
{{- with .Site.Params.homeSubtitle }}
@@ -16,6 +16,7 @@
{{ partial "social-icons.html" . }}
{{- end }}
+
{{ end }}
\ No newline at end of file
diff --git a/themes/maik-blog/layouts/partials/footer.html b/themes/maik-blog/layouts/partials/footer.html
index 0a9be7b..aefeb0c 100644
--- a/themes/maik-blog/layouts/partials/footer.html
+++ b/themes/maik-blog/layouts/partials/footer.html
@@ -2,17 +2,19 @@
diff --git a/themes/maik-blog/layouts/partials/head.html b/themes/maik-blog/layouts/partials/head.html
index ea17ad6..9a04770 100644
--- a/themes/maik-blog/layouts/partials/head.html
+++ b/themes/maik-blog/layouts/partials/head.html
@@ -1,82 +1,47 @@
-
-
-
-
-
-
+
-{{ block "title" . }}
-
- {{ if .IsHome }}
- {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
- {{ else }}
- {{ .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
- {{ end }}
-
-{{ end }}
-
{{ $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" | resources.ToCSS $options | resources.Fingerprint }}
-{{ range $val := $.Site.Params.customCSS }}
-{{ if gt (len $val) 0 }}
+{{- range $val := $.Site.Params.customCSS }}
+{{- if gt (len $val) 0 }}
-{{ end }}
-{{ end }}
-
-
-{{- partial "favicons.html" . }}
+{{- end }}
+{{- end }}
-{{ template "_internal/schema.html" . }}
-{{ template "_internal/twitter_cards.html" . }}
+{{- partial "favicons.html" . -}}
-{{ if isset .Site.Taxonomies "series" }}
-{{ template "_internal/opengraph.html" . }}
-{{ end }}
-
-{{ range .Params.categories }}
-
-{{ end }}
-
-{{ if isset .Params "date" }}
-
-{{ end }}
+
+{{- partial "meta-tags.html" . -}}
-{{ with .OutputFormats.Get "rss" -}}
+
+
-{{ if .OutputFormats.Get "json" }}
+{{- if .OutputFormats.Get "json" }}
-{{ end }}
-
-{{ if .Site.GoogleAnalytics }}
-
-
-
-{{ end }}
\ No newline at end of file
+{{- block "title" . }}
+
+ {{- if .IsHome }}
+ {{- $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }} {{ end }}
+ {{- else }}
+ {{- .Title }} :: {{ $.Site.Title }} {{ with $.Site.Params.Subtitle }} — {{ . }}{{ end }}
+ {{- end -}}
+
+{{- end }}
\ No newline at end of file
diff --git a/themes/maik-blog/layouts/partials/header.html b/themes/maik-blog/layouts/partials/header.html
index 2a15190..dbded2f 100644
--- a/themes/maik-blog/layouts/partials/header.html
+++ b/themes/maik-blog/layouts/partials/header.html
@@ -3,7 +3,7 @@
{{ partial "logo.html" . }}
diff --git a/themes/maik-blog/layouts/partials/javascript.html b/themes/maik-blog/layouts/partials/javascript.html
index affc57b..cb33e07 100644
--- a/themes/maik-blog/layouts/partials/javascript.html
+++ b/themes/maik-blog/layouts/partials/javascript.html
@@ -1,15 +1,26 @@
-{{ $main := resources.Get "js/main.js" }}
-{{ $menu := resources.Get "js/menu.js" }}
-{{ $theme := resources.Get "js/theme.js" }}
-{{ $secureJS := slice $main $menu $theme | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
+{{- $main := resources.Get "js/main.js" }}
+{{- $menu := resources.Get "js/menu.js" }}
+{{- $theme := resources.Get "js/theme.js" }}
+{{- $secureJS := slice $main $menu $theme | resources.Concat "bundle.js" | resources.Minify | resources.Fingerprint "sha512" }}
{{- if .Site.GoogleAnalytics }}
-{{ template "_internal/google_analytics.html" . }}
-{{- end}}
+
+
+
+{{- end }}
+
+{{- range $val := $.Site.Params.customJS }}
+{{- if gt (len $val) 0 }}
-{{ end }}
-{{ end }}
\ No newline at end of file
+{{- end }}
+{{- end }}
\ No newline at end of file
diff --git a/themes/maik-blog/layouts/partials/logo.html b/themes/maik-blog/layouts/partials/logo.html
index 44abe8f..39179fc 100644
--- a/themes/maik-blog/layouts/partials/logo.html
+++ b/themes/maik-blog/layouts/partials/logo.html
@@ -1,15 +1,15 @@
- {{ if .Site.Params.Logo.path }}
+ {{- if .Site.Params.Logo.path }}
- {{ else }}
+ {{- else }}
>
-
{{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }}
-
+ {{- with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }}
+
- {{ end }}
+ {{- end }}
\ No newline at end of file
diff --git a/themes/maik-blog/layouts/partials/menu.html b/themes/maik-blog/layouts/partials/menu.html
index 3c57656..3a0eea4 100644
--- a/themes/maik-blog/layouts/partials/menu.html
+++ b/themes/maik-blog/layouts/partials/menu.html
@@ -1,7 +1,7 @@
{{ end }}
\ No newline at end of file
diff --git a/themes/maik-blog/layouts/rss.xml b/themes/maik-blog/layouts/rss.xml
index 3fbe57b..1935f30 100644
--- a/themes/maik-blog/layouts/rss.xml
+++ b/themes/maik-blog/layouts/rss.xml
@@ -1,26 +1,36 @@
-
+
{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}
{{ .Permalink }}
- Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} {{ with .Site.LanguageCode }}
- {{.}} {{end}}{{ with .Site.Author.email }}
- {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} {{end}}{{ with .Site.Author.email }}
- {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} {{end}}{{ with .Site.Copyright }}
- {{.}} {{end}}{{ if not .Date.IsZero }}
- {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ end }}
- {{ with .OutputFormats.Get "RSS" -}}
+ Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}
+ {{- with .Site.LanguageCode }}
+ {{.}}
+ {{- end }}
+ {{- with .Site.Author.email }}
+ {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}
+ {{- end }}
+ {{- with .Site.Author.email }}
+ {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}
+ {{- end }}
+ {{- with .Site.Copyright }}
+ {{.}}
+ {{- end }}
+ {{- if not .Date.IsZero }}
+ {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
+ {{- end }}
+ {{- with .OutputFormats.Get "RSS" -}}
{{ printf " " .Permalink .MediaType | safeHTML }}
- {{ end -}}
- {{ range .Pages }}
+ {{- end }}
+ {{- range .Pages }}
-
{{ .Title }}
{{ .Permalink }}
{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}
- {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}} {{end}}
+ {{ .Site.Author.name }}
{{ .Permalink }}
- {{ .Summary | html }}
- {{ printf `` .Content | safeHTML }}
+ {{ printf `` .Summary | safeHTML }}
+ {{ printf `` .Content | safeHTML }}
- {{ end }}
+ {{- end }}