lukeorth / poison

Professional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
https://poison.lukeorth.com
GNU General Public License v3.0
172 stars 94 forks source link

Webpages titles case-registry inconsistency #152

Closed n0rdy closed 7 months ago

n0rdy commented 8 months ago

Hello there, Luke! =)

Thanks again for the Poison, I like it more and more while diving deeper into it.

While trying to configure the theme for my personal blog, I noticed a tiny case-registry inconsistency within the webpages titles: as you can see from GitHub, my nickname is n0rdy (lowercase). Here is how it looks in the toml file:

[params]
    brand = "n0rdy"

If I go to the main page, the title looks as expected:

CleanShot 2023-10-27 at 21 11 18@2x

However, when I navigate to the About page or the Posts/any post page, my nickname's first letter changes to the uppercase:

CleanShot 2023-10-27 at 21 12 45@2x

This seems like an inconsistency, from my point of view.

I debugged the source code a bit, and it seems like I found the origin of this behavior:

If I remove the| humanize | title part, the described inconsistency is gone.

I was considering creating a PR, but looks like a breaking change (if I go with the removal approach), that's why I wanted to discuss it first. If you agree that it's smth worth fixing, I can try to do it via the new boolean param that, by default, will keep the behavior as it is right now, but if provided, will drop the | humanize | title part.

Please, let me know what you think about this.

Have fun! =)

lukeorth commented 7 months ago

Thank you, @n0rdy! I agree -- the case should remain consistent.

I think removing the | humanize | title part without adding a boolean param would be just fine. It gives control back to the user, which is always good. I think adding another param would over complicate things too much.

Thanks for finding this and checking! If you want to open a PR, please have at it. Otherwise I can open one too. :)

n0rdy commented 7 months ago

Hey, Luke! Done, please, take a look