Clean way to override capitilization of Site.Title (and subtile)

I may be missing something, as a relative newbie to Hugo, but despite quite a lot of searching etc and reading about customization I’m struggling to find a clean way of preserving the case in my Blog’s title. For example being able to use strings like “DevOps” versus “DEVOPS”.

Hi,

How are you defining the title? And how are you displaying it? Are you using a theme? Hugo usually doesn’t mess with cases when rendering strings, so I’m not sure what you are seeing. It’s difficult to say though; have a read here so we can help you more easily: Requesting Help

Hi - thanks for responding.

Theme: Mainroad, at this point with zero customizations added

I’m setting my title in config.toml i.e.:

title = "MixED Case Title I want TO preserve"

Looking at the theme, the site title has the text-transform: uppercase style applied to it.

The theme has instructions for using a custom css, you could just override this particular style.

4 Likes

Thank you, time for me to dust off long forgotten, and mediocre, css skills.

I appreciate you pointing me in the right direction. I’ll update the thread once I’ve achieved my goal.

Thanks

Thanks, yes you were correct. I used browser inspect mode to examine the element, toggled text-transform: uppercase and got my desired output.

So to make it permanent I copied the theme’s /css/style.css to static/css/style.css and removed text-transform: uppercase from .logo__link

You saved me some time and frustration!

1 Like