-
-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Support for UTF-8 encoded series names; small updates #360
Conversation
Thanks @pfrogond looks good. Would never caught the |
The Fine for english but poor for pretty much anything else (at least by default, maybe there is a way to translate it but I find it easier to just disable it) |
Sorry to add another one, but I just came across this thing. The 200 word limit to display the scroll to top arrow I left the limit on 1 so that the arrow isn't displayed on home page, list pages etc. where there is no word counting. |
I'm getting additional padding on the homepage and other list views when I leave the scrollToTop enabled with the default wordcount. I had to set it to 300 to avoid this padding from happening. |
@rpstreef thanks for the comment, could you please open a new ticket or PR? |
As I write in czech, I noticed that when I use UTF-8 encoded characters (š,ř,ž etc.) in a series name, it won't associate it with any articles. The problem is in the urlize function in the series.html and series-closed.html files.
{{ range $post := sort (index .Site.Taxonomies.series (index .Params.series 0 | urlize)) "Params.series_order" }}
Besides converting the name lowercase and replacing spaces with hyphens it also changes non ASCII characters to URL friendly format (Čeština -> %C4%8Ce%C5%A1tina). That leads to the inability of the next function:
{{ if eq $post.Permalink $.Page.Permalink }}
to match series names with corresponding posts.So I changed the code so that now it only converts the name to lowercase and replaces spaces with hyphens.
I also added my personal website, changed one word in the czech translation and added an option to depluralize list names in config.toml file. The last change is useful for non english languages because the pluralize funcition messes up names in other languages.