Background: I sometimes load extra (S)CSS styles targeting specific pages/sections and have done so for a single-language site making a variable like this {{ $pageName := .LinkTitle | urlize }}
and fetch a similarly named stylesheet under assets/scss/pages/
. This does not work with multiple languages however, as the .LinkTitle
changes depending on the current language.
Current solution: Creating a custom parameter that I add to the front matter of that page/section for every language. Have a look at the specific code in its context.
What I’m after: A “native” way to identify a post/section across multiple languages. My goal is to avoid using a custom param in front matter. It does not even have to be a name, it can be a random string – as long as it does not change and is shared across languages.
Any suggestions?