-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Why are CATEGORIES_URL and TAGS_URL gone? #1225
Comments
I'm not seeing |
See #1220 and 6264cf8 for more information. I had not realized @saimn's notation about hardcoding when I merged that PR. I think this is something we should change. It doesn't make sense to me to have |
If I may ask, why are there two settings for each URL? (ie. |
@dandydev This is described in the documentation http://docs.getpelican.com/en/3.3.0/settings.html#url-settings
ARTICLE_URL = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/'
ARTICLE_SAVE_AS = 'posts/{date:%Y}/{date:%b}/{date:%d}/{slug}/index.html'
So one has index.html (save_as) and the actual URL used for linking does not. |
Sorry, I wasn't looking very well, because it's right there in my own config :) Or maybe, considering that those URL's won't be dynamic, like the others, Pelican could implicitly set the Edit: never mind, you would probably want to be able to do something along the lines of
|
Any update on this? |
There's still no default for |
If memory serves, these settings can be defined and then used in themes, but there's no need for them to be explicitly included in Pelican. If someone can make a contrary case, feel free to do so and I will re-open this issue. |
Non-hardcoded paths are not that simple. Direct templates do not always have meaningful *_URL or even *_SAVE_AS values. More than that, those variables are not even defined by default. Therefore we need to replicate the logic used by Pelican itself when calculating the path to direct template output. Related: - DIRECT_TEMPLATES handling by Pelican: https://github.com/getpelican/pelican/blob/01eb08c42b543450ee5e0e3de3854526708a6711/pelican/generators.py#L537-L550 - Pelican issue for "Why are CATEGORIES_URL and TAGS_URL gone?" getpelican/pelican#1225 Merges nairobilug#75
Non-hardcoded paths are not that simple. Direct templates do not always have meaningful *_URL or even *_SAVE_AS values. More than that, those variables are not even defined by default. Therefore we need to replicate the logic used by Pelican itself when calculating the path to direct template output. Related: - DIRECT_TEMPLATES handling by Pelican: https://github.com/getpelican/pelican/blob/01eb08c42b543450ee5e0e3de3854526708a6711/pelican/generators.py#L537-L550 - Pelican issue for "Why are CATEGORIES_URL and TAGS_URL gone?" getpelican/pelican#1225 Merges nairobilug#75
According to the 3.3.0 docs,
TAGS_URL
andCATEGORIES_URL
exist and have defaults. However, according to the latest docs those settings don't exist anymore, and it's actually advised to put the urls hardcoded in the theme. That seems "dirty". Why has this changed?The text was updated successfully, but these errors were encountered: