diff --git a/assets/js/menu.js b/assets/js/menu.js index 11c722c..125c49a 100644 --- a/assets/js/menu.js +++ b/assets/js/menu.js @@ -20,3 +20,10 @@ menuTrigger && ); window.addEventListener("resize", isMobileMenu); + +const logo = document.querySelector(".logo__pathname"); +if(logo){ + window.onload = () => { + logo.textContent += window.location.pathname.substring(1); + }; +} \ No newline at end of file diff --git a/exampleSite/config.toml b/exampleSite/config.toml index da7723f..afec38b 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -138,6 +138,8 @@ disableHugoGeneratorInject = false # logoCursorColor = "#67a2c9" # Set to a valid CSS time value to change the animation duration, "0s" to disable. # logoCursorAnimate = "2s" + # Append the current url pathname to logoText + # logoCursorPathname = true # Commento is more than just a comments widget you can embed — # it’s a return to the roots of the internet. diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html index 70072e2..0136aac 100644 --- a/layouts/partials/logo.html +++ b/layouts/partials/logo.html @@ -4,7 +4,8 @@ {{ .Site.Params.Logo.alt }} {{ else }} {{ with .Site.Params.Logo.logoMark }}{{ . }}{{ else }}>{{ end }} - {{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }} + + {{ with .Site.Params.Logo.logoText }}{{ . }}{{ else }}hello{{ end }}