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
[feature request] use ARTICLE_{URL,SAVE_AS} for articles with only one (non-default) language #1404
Comments
Actually, this should be done by https://github.com/getpelican/pelican/blob/master/pelican/utils.py#L467 - or does that not affect the generated file names? |
@azrdev: Not really. URL/SAVE_AS settings are decided on whether the article is in default language or not. And that is the expected behavior as stated in the docs [emphasis added]:
If it's not a translation, can't you simply not give any |
@avaris I can, now I do, and just create tags defining the language… seems to suit my needs, but as soon as I want to publish a translated version of some article, this will become inconsistent |
I do see your point. However, the current behavior is also consistent in a way. Perhaps, this can be handled with a plugin? Forcing |
EDITED: this approach is not working perfectly, it has a flaw that article.url is always returning an url that belongs 'article other than the default language'. Forcing in_default_lang to True would be an easy-enough way to do this. I'd propose a solution to this issue which are from my attempt in solving #1393
|
@azrdev I've implemented this feature in a pelican plugin - pelican-langcategory (which make articles can be browsed by their language, like categories), you can check it out to see if it can fit your needs. |
|
If there is only one version of an article, the url it is getting depends on his language:
So assume my blog contains mostly articles in english, but some in another language… the latter would always have the lang attribute in the url, regardless of wether there exists an english version or not.
So I request to change the selection mechanism between ARTICLE_URL and ARTICLE_LANG_URL: Do not decide upon lang == DEFAULT_LANG, but if the article is the untranslated source.
Setting Translation: False in the article didn't help, maybe this whole thing is just a bug… you tell me :-)
The text was updated successfully, but these errors were encountered: