Skip to content
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

Custom alt title in multilingual mode #364

Merged

Conversation

geeqla
Copy link
Contributor

@geeqla geeqla commented Apr 15, 2021

Hi @adityatelange,

I would like to propose two minor tweaks in multilingual mode:

1. Custom alt title

Currently, when someone uses emoji like 🇬🇧 as languageName, PaperMod renders the alt title "as-is" (i.e. :gb:). In other words, it displays actual value from config ... which is not great. To go around this, I suggest to introduce a new optional param languageAltTitle in the "languages" section so the user could customise what is displayed.

For example:

languages:
  en:
    languageName: ":gb:"
    languageAltTitle: "English"
    ...

This will render a country flag 🇬🇧 with alt title "English".

2. Fallback to emoji

I suggest to add a fallback option to "emojify" the alt title. This way, if the User does not want to customise anything, PaperMod could still render emoji in the alt title properly.

You can preview the change at https://www.geeqla.com

Thank you!

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@adityatelange adityatelange merged commit d136063 into adityatelange:master Apr 17, 2021
@geeqla geeqla deleted the feature/language-alt-title branch April 17, 2021 16:37
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants