From 4d297de4ea04a921714d890b215bb71e075332de Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 17 Jan 2021 17:18:02 -0800 Subject: [PATCH] Allow adding a heading to the endnotes section --- content/posts/password-strength.md | 1 + themes/etch-custom/layouts/_default/single.html | 2 +- themes/etch-custom/layouts/partials/processed-content.html | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 themes/etch-custom/layouts/partials/processed-content.html diff --git a/content/posts/password-strength.md b/content/posts/password-strength.md index 30f93f9..385b04f 100644 --- a/content/posts/password-strength.md +++ b/content/posts/password-strength.md @@ -9,6 +9,7 @@ tags: - security - fun title: Becoming physically immune to brute-force attacks +footnote_heading: References and endnotes --- This is a tale of the intersection between thermal physics, cosmology, and a tiny diff --git a/themes/etch-custom/layouts/_default/single.html b/themes/etch-custom/layouts/_default/single.html index 54220f5..8fc6d7b 100644 --- a/themes/etch-custom/layouts/_default/single.html +++ b/themes/etch-custom/layouts/_default/single.html @@ -12,7 +12,7 @@ {{ end }}
- {{ .Content -}} + {{ partial "processed-content" . -}}

diff --git a/themes/etch-custom/layouts/partials/processed-content.html b/themes/etch-custom/layouts/partials/processed-content.html new file mode 100644 index 0000000..414ce30 --- /dev/null +++ b/themes/etch-custom/layouts/partials/processed-content.html @@ -0,0 +1,7 @@ +{{ if .Params.footnote_heading -}} +{{ $references := `(
+

%s