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

opengraph template: CJK series meta tag malfunction #10647

Closed
wants to merge 1 commit into from
Closed

opengraph template: CJK series meta tag malfunction #10647

wants to merge 1 commit into from

Conversation

tomy0000000
Copy link
Contributor

The current opengraph.html template generate the og:see_also meta tags, but it does not work when the series front matter includes CJK characters. The root cause is that these characters are being url-encoded after urlize filter, while they're not in the .Site.Taxonomies.series map.

e.g.
Say I have a tag named 料理, after urlize filter, it becomes %E6%96%99%E7%90%86. Meanwhile, the .Site.Taxonomies.series looks a bit like:

map[料理:[WeightedPage(0,"炒飯") WeightedPage(0,"炒麵")]]

which is why it return no series page.

The ideal solution should be removing the urlize, but the filter also sanitized other characters (e.g. emojis), so I fix the bug by using the urls.Parse function and then take the Path attribute, which is roughly URL decode the percentage encoded string back.

@tomy0000000
Copy link
Contributor Author

Is there anything I should do to fix the CI checks?

@jmooring jmooring changed the title templates: CJK series meta tag malfunction opengraph template: CJK series meta tag malfunction May 21, 2023
jmooring added a commit to jmooring/hugo that referenced this pull request Apr 1, 2024
Changes:

- Add tags per documentation
- Prefer site.Title over site.Params.title
- Plainify titles, tags, and descriptions
- Add fallback values for locale
- Fix pages related by series
- Improve readability

Closes gohugoio#8296
Closes gohugoio#8698
Closes gohugoio#8991
Closes gohugoio#9818
Closes gohugoio#9866
Closes gohugoio#10647

Co-authored by: tomy0000000 <git@tomy.me>
Co-authored by: sean-au <sean@powerfulwebdesign.com.au>
jmooring added a commit to jmooring/hugo that referenced this pull request Apr 1, 2024
Changes:

- Add tags per documentation
- Prefer site.Title over site.Params.title
- Plainify titles, tags, and descriptions
- Add fallback values for locale
- Fix pages related by series
- Improve readability

Closes gohugoio#8296
Closes gohugoio#8698
Closes gohugoio#8991
Closes gohugoio#9818
Closes gohugoio#9866
Closes gohugoio#10647

Co-authored-by: tomy0000000 <git@tomy.me>
Co-authored-by: sean-au <sean@powerfulwebdesign.com.au>
jmooring added a commit to jmooring/hugo that referenced this pull request Apr 2, 2024
Changes:

- Add tags per documentation
- Prefer site.Title over site.Params.title
- Plainify titles, tags, and descriptions
- Add fallback values for locale
- Fix pages related by series
- Improve readability

Closes gohugoio#8296
Closes gohugoio#8698
Closes gohugoio#8991
Closes gohugoio#9818
Closes gohugoio#9866
Closes gohugoio#10647

Co-authored-by: tomy0000000 <git@tomy.me>
Co-authored-by: sean-au <sean@powerfulwebdesign.com.au>
jmooring added a commit to jmooring/hugo that referenced this pull request Apr 2, 2024
Changes:

- Add tags per documentation
- Prefer site.Title over site.Params.title
- Plainify titles, tags, and descriptions
- Add fallback values for locale
- Fix pages related by series
- Improve readability

Closes gohugoio#8296
Closes gohugoio#8698
Closes gohugoio#8991
Closes gohugoio#9818
Closes gohugoio#9866
Closes gohugoio#10647

Co-authored-by: tomy0000000 <git@tomy.me>
Co-authored-by: sean-au <sean@powerfulwebdesign.com.au>
@bep bep closed this in #12328 Apr 2, 2024
@bep bep closed this in 2da4ec5 Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy