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

How to put tags on a page without translation? #2757

Closed
nicokosi opened this issue Jan 2, 2025 · 3 comments
Closed

How to put tags on a page without translation? #2757

nicokosi opened this issue Jan 2, 2025 · 3 comments

Comments

@nicokosi
Copy link

nicokosi commented Jan 2, 2025

How to put tags on a page without translation?

Environment

Zola version: 0.19.2.

Expected Behavior

On a multilingual site, I would like to have a page:

  1. with tags
  2. without translation

Current Behavior

Cannot serve, error is "Error: Reason: `get_taxonomy_url`: couldn't find `*` in `tags` taxonomy":

RUST_BACKTRACE=1 zola serve
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 3 pages (0 orphan) and 1 sections
Error: Failed to serve the site
Error: Failed to render page '🙈/content/an-article.fr.md'
Error: Reason: Failed to render 'page.html'
Error: Reason: Function call 'get_taxonomy_url' failed
Error: Reason: `get_taxonomy_url`: couldn't find `foo` in `tags` taxonomy

Step to reproduce

  1. create a multilingual site with a default language (for instance, English)
  2. create a page with another language (for instance, French), for instance content/an-article.fr.md, that has tags (note that content/an-article.md does not exist)
  3. run zola serve

See this branch content for a full example (I also added another page named another-article but it is not required to reproduce the issue).

Additional notes

May this be a configuration issue? For instance, I wonder if tags should be segregated by language. 💭
For the moment, my work-around is to deactivate tags on pages that have no default translation. 🙈

@Keats
Copy link
Collaborator

Keats commented Jan 2, 2025

I wonder if tags should be segregated by language

They are.

I'll have a look tomorrow

@Keats
Copy link
Collaborator

Keats commented Jan 4, 2025

The theme is not passing the current lang to the get_taxonomy_url so it's always trying to fetch the taxonomy for the default language. That's an issue in the theme itself.

@Keats Keats closed this as completed Jan 4, 2025
@nicokosi
Copy link
Author

nicokosi commented Jan 6, 2025

The theme is not passing the current lang to the get_taxonomy_url so it's always trying to fetch the taxonomy for the default language. That's an issue in the theme itself.

Thank you, @Keats. 🤗
I will report this issue to the Apollo theme (and propose a fix, maybe). 🐛

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

No branches or pull requests

2 participants