diff --git a/config.toml b/config.toml index 61165ad..504ac7e 100644 --- a/config.toml +++ b/config.toml @@ -36,7 +36,8 @@ disableHugoGeneratorInject = false googleAnalytics = "UA-136337666-1" [permalinks] - posts = "/posts/:year/:month/:title/" + posts = "/posts/:title/" + writeups = "/:sections/:title/" [author] name = "Maik de Kruif" @@ -48,8 +49,8 @@ googleAnalytics = "UA-136337666-1" twitter = "@maik_dev" [outputs] - home = ["HTML", "AMP", "RSS"] - page = ["HTML", "AMP", "RSS"] + home = ["HTML", "RSS"] + page = ["HTML", "RSS"] [params] dateform = "Jan 2, 2006" diff --git a/content/writeups/adventofctf/2020/_index.md b/content/writeups/adventofctf/2020/_index.md new file mode 100644 index 0000000..ebd6f7b --- /dev/null +++ b/content/writeups/adventofctf/2020/_index.md @@ -0,0 +1,5 @@ ++++ +author = "Maik de Kruif" +title = "2020" +description = "My Advent of CTF - 2020 writeups." ++++ diff --git a/content/writeups/adventofctf/2020/challenge_0.md b/content/writeups/adventofctf/2020/challenge_0.md index 633abeb..6c7032c 100644 --- a/content/writeups/adventofctf/2020/challenge_0.md +++ b/content/writeups/adventofctf/2020/challenge_0.md @@ -18,6 +18,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_0" +] +++ - Points: 1 diff --git a/content/writeups/adventofctf/2020/challenge_1.md b/content/writeups/adventofctf/2020/challenge_1.md index 25c2db9..a974528 100644 --- a/content/writeups/adventofctf/2020/challenge_1.md +++ b/content/writeups/adventofctf/2020/challenge_1.md @@ -18,6 +18,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_1" +] +++ - Points: 100 diff --git a/content/writeups/adventofctf/2020/challenge_10.md b/content/writeups/adventofctf/2020/challenge_10.md index 4d307d9..0bc71a4 100644 --- a/content/writeups/adventofctf/2020/challenge_10.md +++ b/content/writeups/adventofctf/2020/challenge_10.md @@ -18,6 +18,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_10" +] +++ - Points: 1000 diff --git a/content/writeups/adventofctf/2020/challenge_11.md b/content/writeups/adventofctf/2020/challenge_11.md index 8a5846b..3ad6230 100644 --- a/content/writeups/adventofctf/2020/challenge_11.md +++ b/content/writeups/adventofctf/2020/challenge_11.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_11" +] +++ - Points: 1100 diff --git a/content/writeups/adventofctf/2020/challenge_12.md b/content/writeups/adventofctf/2020/challenge_12.md index 9053bf1..53d5bad 100644 --- a/content/writeups/adventofctf/2020/challenge_12.md +++ b/content/writeups/adventofctf/2020/challenge_12.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_12" +] +++ - Points: 1200 diff --git a/content/writeups/adventofctf/2020/challenge_13.md b/content/writeups/adventofctf/2020/challenge_13.md index b9e6f3a..8394917 100644 --- a/content/writeups/adventofctf/2020/challenge_13.md +++ b/content/writeups/adventofctf/2020/challenge_13.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_13" +] +++ - Points: 1300 diff --git a/content/writeups/adventofctf/2020/challenge_14.md b/content/writeups/adventofctf/2020/challenge_14.md index 31ae945..e9d9c62 100644 --- a/content/writeups/adventofctf/2020/challenge_14.md +++ b/content/writeups/adventofctf/2020/challenge_14.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_14" +] +++ - Points: 1400 diff --git a/content/writeups/adventofctf/2020/challenge_15.md b/content/writeups/adventofctf/2020/challenge_15.md index 27b2cf3..2e9d396 100644 --- a/content/writeups/adventofctf/2020/challenge_15.md +++ b/content/writeups/adventofctf/2020/challenge_15.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_15" +] +++ - Points: 1500 diff --git a/content/writeups/adventofctf/2020/challenge_16.md b/content/writeups/adventofctf/2020/challenge_16.md index 7bd48bd..693b9ab 100644 --- a/content/writeups/adventofctf/2020/challenge_16.md +++ b/content/writeups/adventofctf/2020/challenge_16.md @@ -20,6 +20,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_16" +] +++ - Points: 1600 diff --git a/content/writeups/adventofctf/2020/challenge_17.md b/content/writeups/adventofctf/2020/challenge_17.md index d55f5f2..ef35eba 100644 --- a/content/writeups/adventofctf/2020/challenge_17.md +++ b/content/writeups/adventofctf/2020/challenge_17.md @@ -20,6 +20,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_17" +] +++ - Points: 1700 diff --git a/content/writeups/adventofctf/2020/challenge_18.md b/content/writeups/adventofctf/2020/challenge_18.md index a66799f..fe9dda9 100644 --- a/content/writeups/adventofctf/2020/challenge_18.md +++ b/content/writeups/adventofctf/2020/challenge_18.md @@ -20,6 +20,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_18" +] +++ - Points: 1800 diff --git a/content/writeups/adventofctf/2020/challenge_19.md b/content/writeups/adventofctf/2020/challenge_19.md index 6d5f73c..9410808 100644 --- a/content/writeups/adventofctf/2020/challenge_19.md +++ b/content/writeups/adventofctf/2020/challenge_19.md @@ -20,6 +20,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_19" +] +++ - Points: 1900 diff --git a/content/writeups/adventofctf/2020/challenge_2.md b/content/writeups/adventofctf/2020/challenge_2.md index 4e94b57..5378c54 100644 --- a/content/writeups/adventofctf/2020/challenge_2.md +++ b/content/writeups/adventofctf/2020/challenge_2.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_2" +] +++ - Points: 200 diff --git a/content/writeups/adventofctf/2020/challenge_20.md b/content/writeups/adventofctf/2020/challenge_20.md index 7ae971d..a0dbccf 100644 --- a/content/writeups/adventofctf/2020/challenge_20.md +++ b/content/writeups/adventofctf/2020/challenge_20.md @@ -20,6 +20,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_20" +] +++ - Points: 2000 diff --git a/content/writeups/adventofctf/2020/challenge_21.md b/content/writeups/adventofctf/2020/challenge_21.md index 1237ce7..a771ac8 100644 --- a/content/writeups/adventofctf/2020/challenge_21.md +++ b/content/writeups/adventofctf/2020/challenge_21.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_21" +] +++ - Points: 2100 diff --git a/content/writeups/adventofctf/2020/challenge_22.md b/content/writeups/adventofctf/2020/challenge_22.md index 0c80ef7..ce69bdc 100644 --- a/content/writeups/adventofctf/2020/challenge_22.md +++ b/content/writeups/adventofctf/2020/challenge_22.md @@ -20,6 +20,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_22" +] +++ - Points: 2200 diff --git a/content/writeups/adventofctf/2020/challenge_23.md b/content/writeups/adventofctf/2020/challenge_23.md index 6ace3c0..e1d892b 100644 --- a/content/writeups/adventofctf/2020/challenge_23.md +++ b/content/writeups/adventofctf/2020/challenge_23.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_23" +] +++ - Points: 2300 diff --git a/content/writeups/adventofctf/2020/challenge_24.md b/content/writeups/adventofctf/2020/challenge_24.md index cc52f4b..c840e7c 100644 --- a/content/writeups/adventofctf/2020/challenge_24.md +++ b/content/writeups/adventofctf/2020/challenge_24.md @@ -21,6 +21,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_24" +] +++ - Points: 2400 diff --git a/content/writeups/adventofctf/2020/challenge_3.md b/content/writeups/adventofctf/2020/challenge_3.md index ff7350d..0d579ee 100644 --- a/content/writeups/adventofctf/2020/challenge_3.md +++ b/content/writeups/adventofctf/2020/challenge_3.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_3" +] +++ - Points: 300 diff --git a/content/writeups/adventofctf/2020/challenge_4.md b/content/writeups/adventofctf/2020/challenge_4.md index 256e357..96c469a 100644 --- a/content/writeups/adventofctf/2020/challenge_4.md +++ b/content/writeups/adventofctf/2020/challenge_4.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_4" +] +++ - Points: 400 diff --git a/content/writeups/adventofctf/2020/challenge_5.md b/content/writeups/adventofctf/2020/challenge_5.md index 178d05b..a73e6f1 100644 --- a/content/writeups/adventofctf/2020/challenge_5.md +++ b/content/writeups/adventofctf/2020/challenge_5.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_5" +] +++ - Points: 500 diff --git a/content/writeups/adventofctf/2020/challenge_6.md b/content/writeups/adventofctf/2020/challenge_6.md index 8b521c5..c095a29 100644 --- a/content/writeups/adventofctf/2020/challenge_6.md +++ b/content/writeups/adventofctf/2020/challenge_6.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_6" +] +++ - Points: 600 diff --git a/content/writeups/adventofctf/2020/challenge_7.md b/content/writeups/adventofctf/2020/challenge_7.md index 3f9c974..62f56a4 100644 --- a/content/writeups/adventofctf/2020/challenge_7.md +++ b/content/writeups/adventofctf/2020/challenge_7.md @@ -19,6 +19,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_7" +] +++ - Points: 700 diff --git a/content/writeups/adventofctf/2020/challenge_8.md b/content/writeups/adventofctf/2020/challenge_8.md index d6ba6e3..be8fbaf 100644 --- a/content/writeups/adventofctf/2020/challenge_8.md +++ b/content/writeups/adventofctf/2020/challenge_8.md @@ -18,6 +18,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_8" +] +++ - Points: 800 diff --git a/content/writeups/adventofctf/2020/challenge_9.md b/content/writeups/adventofctf/2020/challenge_9.md index 2d751e3..0502a5b 100644 --- a/content/writeups/adventofctf/2020/challenge_9.md +++ b/content/writeups/adventofctf/2020/challenge_9.md @@ -18,6 +18,9 @@ categories = [ "writeups", "hacking", ] +aliases = [ + "challenge_9" +] +++ - Points: 900 diff --git a/content/writeups/adventofctf/2020/intro.md b/content/writeups/adventofctf/2020/intro.md index 946df06..2f7be53 100644 --- a/content/writeups/adventofctf/2020/intro.md +++ b/content/writeups/adventofctf/2020/intro.md @@ -15,6 +15,9 @@ categories = [ "ctf", "hacking", ] +aliases = [ + "intro" +] +++ So, I'm in this Discord server and somebody by the name [@credmp](https://twitter.com/credmp) thought it'd be a great idea to do an advent calendar of CTF challenges. Every day of december, up until christmas, a new challenge will open up. It starts out easy, accessible to anyone and will grow in complexity as time progresses. diff --git a/content/writeups/adventofctf/_index.md b/content/writeups/adventofctf/_index.md new file mode 100644 index 0000000..c649fc3 --- /dev/null +++ b/content/writeups/adventofctf/_index.md @@ -0,0 +1,5 @@ ++++ +author = "Maik de Kruif" +title = "Advent of CTF" +description = "My Advent of CTF writeups." ++++ diff --git a/content/writeups/google-ctf/2021/_index.md b/content/writeups/google-ctf/2021/_index.md new file mode 100644 index 0000000..36172c5 --- /dev/null +++ b/content/writeups/google-ctf/2021/_index.md @@ -0,0 +1,5 @@ ++++ +author = "Maik de Kruif" +title = "2021" +description = "My Google CTF - 2021 writeups." ++++ diff --git a/content/writeups/google-ctf/2021/beginners-quest/1.md b/content/writeups/google-ctf/2021/beginners-quest/1.md index 14b1930..aff13bf 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/1.md +++ b/content/writeups/google-ctf/2021/beginners-quest/1.md @@ -20,6 +20,9 @@ categories = [ "hacking", "rev", ] +aliases = [ + "1" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/10.md b/content/writeups/google-ctf/2021/beginners-quest/10.md index d2fc420..b684630 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/10.md +++ b/content/writeups/google-ctf/2021/beginners-quest/10.md @@ -19,6 +19,9 @@ categories = [ "hacking", "hardware", ] +aliases = [ + "10" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/2.md b/content/writeups/google-ctf/2021/beginners-quest/2.md index 2c07ea1..afe0ceb 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/2.md +++ b/content/writeups/google-ctf/2021/beginners-quest/2.md @@ -20,6 +20,9 @@ categories = [ "hacking", "misc", ] +aliases = [ + "2" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/3.md b/content/writeups/google-ctf/2021/beginners-quest/3.md index 16f44f8..7ce1517 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/3.md +++ b/content/writeups/google-ctf/2021/beginners-quest/3.md @@ -21,6 +21,9 @@ categories = [ "hacking", "misc", ] +aliases = [ + "3" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/4.md b/content/writeups/google-ctf/2021/beginners-quest/4.md index 793075c..0111d4c 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/4.md +++ b/content/writeups/google-ctf/2021/beginners-quest/4.md @@ -20,6 +20,9 @@ categories = [ "writeups", "hw", ] +aliases = [ + "4" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/5.md b/content/writeups/google-ctf/2021/beginners-quest/5.md index 66e9fa9..9d01a0b 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/5.md +++ b/content/writeups/google-ctf/2021/beginners-quest/5.md @@ -19,6 +19,9 @@ categories = [ "hacking", "misc", ] +aliases = [ + "5" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/6.md b/content/writeups/google-ctf/2021/beginners-quest/6.md index 81eb1b8..f754863 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/6.md +++ b/content/writeups/google-ctf/2021/beginners-quest/6.md @@ -19,6 +19,9 @@ categories = [ "hacking", "misc", ] +aliases = [ + "6" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/7.md b/content/writeups/google-ctf/2021/beginners-quest/7.md index 99e9fc8..ca11559 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/7.md +++ b/content/writeups/google-ctf/2021/beginners-quest/7.md @@ -19,6 +19,9 @@ categories = [ "hacking", "crypto", ] +aliases = [ + "7" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/8.md b/content/writeups/google-ctf/2021/beginners-quest/8.md index ba80ede..131c85b 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/8.md +++ b/content/writeups/google-ctf/2021/beginners-quest/8.md @@ -19,6 +19,9 @@ categories = [ "hacking", "misc", ] +aliases = [ + "8" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/9.md b/content/writeups/google-ctf/2021/beginners-quest/9.md index 6adc0bd..2a7bb32 100644 --- a/content/writeups/google-ctf/2021/beginners-quest/9.md +++ b/content/writeups/google-ctf/2021/beginners-quest/9.md @@ -19,6 +19,9 @@ categories = [ "hacking", "reversing", ] +aliases = [ + "9" +] +++ ## Story line diff --git a/content/writeups/google-ctf/2021/beginners-quest/_index.md b/content/writeups/google-ctf/2021/beginners-quest/_index.md new file mode 100644 index 0000000..3121fce --- /dev/null +++ b/content/writeups/google-ctf/2021/beginners-quest/_index.md @@ -0,0 +1,5 @@ ++++ +author = "Maik de Kruif" +title = "Beginners Quest" +description = "My Google CTF - 2021 - Beginners Quest writeups." ++++ diff --git a/content/writeups/google-ctf/_index.md b/content/writeups/google-ctf/_index.md new file mode 100644 index 0000000..5f4bd4d --- /dev/null +++ b/content/writeups/google-ctf/_index.md @@ -0,0 +1,5 @@ ++++ +author = "Maik de Kruif" +title = "Google CTF" +description = "My Google CTF writeups." ++++ diff --git a/themes/maik-blog/layouts/_default/list.html b/themes/maik-blog/layouts/_default/list.html index 733dfa0..4d93091 100644 --- a/themes/maik-blog/layouts/_default/list.html +++ b/themes/maik-blog/layouts/_default/list.html @@ -5,7 +5,7 @@

{{ .Title }}

{{- if and .Content (not .Paginator.HasPrev) }} -
{{ .Content }}
+
{{ .Content }}
{{- end }} {{- if .Paginator.HasPrev }} diff --git a/themes/maik-blog/layouts/partials/seo.html b/themes/maik-blog/layouts/partials/seo.html index f16f518..fbbdce9 100644 --- a/themes/maik-blog/layouts/partials/seo.html +++ b/themes/maik-blog/layouts/partials/seo.html @@ -1,195 +1,292 @@ +{{- /* */}} +{{- $breadcrumbs := slice }} +{{- $path := "" }} +{{- if or (eq .Kind "taxonomy") (or (eq .Kind "term") (eq .Kind "404")) }} +{{- $path = .RelPermalink }} +{{- else if .File }} +{{- $path = string .File }} +{{- else if .IsHome }} +{{- $path = "" }} +{{- else }} +{{- errorf "Could not find page at url: \"%s\"!" .RelPermalink }} +{{- end }} +{{- $path = trim $path "/" }} +{{- $currentPath := "" }} +{{- $breadcrumbs = $breadcrumbs | append (dict "name" "Home" "url" $.Site.BaseURL) }} +{{- range split $path "/" }} +{{- $currentPath = printf "%s/%s" $currentPath . }} +{{- $page := $.GetPage $currentPath }} +{{- if not $.IsHome }} +{{- if ne . "_index.md" }} +{{- if eq $.Kind "404" }} +{{- $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) }} +{{- else }} +{{- $breadcrumbs = $breadcrumbs | append (dict "name" $title "url" $page.Permalink)}} +{{- end }} +{{- end }} +{{- end }} +{{- end }} +{{- end }} -{{- if .IsHome }} -{{- else if .IsPage }} - -{{- else if .IsSection }} - -{{- end }} diff --git a/themes/maik-blog/layouts/portfolio/list.html b/themes/maik-blog/layouts/portfolio/list.html index f2b281e..09a1179 100644 --- a/themes/maik-blog/layouts/portfolio/list.html +++ b/themes/maik-blog/layouts/portfolio/list.html @@ -4,7 +4,7 @@

Portfolio

{{- if and .Content (not .Paginator.HasPrev) }} -
{{ .Content }}
+
{{ .Content }}
{{- end }}
diff --git a/themes/maik-blog/layouts/writeups/list.html b/themes/maik-blog/layouts/writeups/list.html index 7941b4a..1f95f10 100644 --- a/themes/maik-blog/layouts/writeups/list.html +++ b/themes/maik-blog/layouts/writeups/list.html @@ -1,11 +1,19 @@ {{ define "main" }} -{{ $paginator := .Paginate .Data.Pages }} + +{{- $allWriteups := slice }} +{{- range where (where .Site.Pages "Section" .Section) "IsPage" true }} +{{- if $.IsAncestor . }} +{{- $allWriteups = $allWriteups | append . }} +{{- end }} +{{- end }} +{{- $allWriteups = sort $allWriteups "Date" "desc" }} +{{ $paginator := .Paginate $allWriteups }}

{{ .Title }}

{{- if and .Content (not .Paginator.HasPrev) }} -
{{ .Content }}
+
{{ .Content }}
{{- end }} {{- if .Paginator.HasPrev }}