arulrajnet / attila

Pelican version of ghost theme https://github.com/zutrinken/attila
MIT License
173 stars 74 forks source link

First and Last Name of Authors are not Maintaining their Capitalization #66

Closed Eoin-ONeill-Yokai closed 2 years ago

Eoin-ONeill-Yokai commented 2 years ago

Say I have a simple post that looks like the following:

Title: Joining the blog club...
Date: 2022-08-18 12:32
Authors: Eoin O'Neill
Slug: hello-world
Category: Fluff

** SOME SNIPPET*

For some reason, the capitalization of my own name looks like Eoin o'neill -- which obviously isn't correct. I haven't noticed this in some other themes, so perhaps there's something going on with the CSS that's enforcing certain capitalization styles?

sio commented 2 years ago

The error comes from Jinja2 template: https://github.com/arulrajnet/attila/blob/fbe73a2747b42fccee25e272cc468450426b764b/templates/article.html#L89

I think I will have some free time next week to fix this.

arulrajnet commented 2 years ago

@Eoin-ONeill-Yokai

2022-09-18_21-15

The jinja2 is convert title case as like below

Eoin o'Neill -> Eoin O'neill Eoin O'Neill -> Eoin O'neill eoin o'neill -> Eoin O'neill

In my case, O is capital letter always and n is small letter.

In your case, the second word start with small letter. Could you share your pelican and jinja2 version?

Moreover, There is no way to fix, If you want output like Eoin O'Neill

Thanks @sio

sio commented 2 years ago

My idea was to remove title filter altogether because typically it's safe to assume that people know how to capitalize their own name correctly.

Eoin-ONeill-Yokai commented 2 years ago

@sio @arulrajnet Simply having the option to turn off title casing for names would be nice. Especially if it could be configured within the pelican config file.

arulrajnet commented 2 years ago

@Eoin-ONeill-Yokai and @sio There is a workaround.

Define AUTHORS_BIO in conf file as like this https://github.com/arulrajnet/attila-demo/blob/master/pelicanconf.py#L131

Use the unique author name in front-matter https://raw.githubusercontent.com/arulrajnet/attila-demo/master/content/featured-color-header-view.rst

Then theme will use the name from AUTHORS_BIO

image

arulrajnet commented 2 years ago

Closing this. Since we have a workaround.