diff --git a/exampleSite/content/posts/post-6.md b/exampleSite/content/posts/post-6.md index f0d82e5..da7d33e 100644 --- a/exampleSite/content/posts/post-6.md +++ b/exampleSite/content/posts/post-6.md @@ -2,6 +2,7 @@ title: "Hugo shortcodes" date: 2021-07-04T12:13:36+05:30 description: Here is a demo of all shortcodes available in Hugo. +tags: [markdown] --- ## Images diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 9648bf3..3ae07ed 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -6,7 +6,38 @@
{{ partial "head.html" . }} -

All tags

+

Tag: {{ .Title }}

+ + {{ with (.Site.GetPage .Title) }} + + {{ end }}
{{ partial "footer.html" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 6ec46d5..baf2684 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -7,7 +7,7 @@ {{ partial "head.html" . }}

{{ .Name }}

- + {{ $biggest := 1 }} {{ $smallest := 1 }} {{ $max := 3 }} @@ -26,5 +26,4 @@

{{ .Name }}

{{ partial "footer.html" . }} - diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0b10d88..2d92e25 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,6 +1,6 @@ diff --git a/static/js/main.js b/static/js/main.js index 113c9b6..a87e9c5 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -15,21 +15,24 @@ document.addEventListener("DOMContentLoaded", function(){ scheme = savedScheme; } - if(scheme == "dark") { - darkscheme(toggle, container); - } else { - lightscheme(toggle, container); - } - - toggle.addEventListener("click", () => { - if (toggle.className === "light") { + if (toggle) { + if(scheme == "dark") { darkscheme(toggle, container); - } else if (toggle.className === "dark") { - lightscheme(toggle, container); + } else { + lightscheme(toggle, container); } - }); + + toggle.addEventListener("click", () => { + if (toggle.className === "light") { + darkscheme(toggle, container); + } else if (toggle.className === "dark") { + lightscheme(toggle, container); + } + }); + } }); + function darkscheme(toggle, container) { localStorage.setItem("scheme", "dark"); toggle.innerHTML = feather.icons.sun.toSvg();