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

Do not hardcode paths to Authors, Archives, Categories, Tags #75

Closed
wants to merge 1 commit into from

Conversation

vedranmiletic
Copy link
Contributor

Use AUTHORS_URL, ARCHIVES_URL, CATEGORIES_URL, TAGS_URL instead.

Use AUTHORS_URL, ARCHIVES_URL, CATEGORIES_URL, TAGS_URL instead.
sio added a commit to sio/pelican-alchemy that referenced this pull request Oct 22, 2019
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
@sio
Copy link
Collaborator

sio commented Oct 22, 2019

Thank you for this improvement!

I've added support for some edge cases and merged this into master

@sio sio closed this Oct 22, 2019
brodul pushed a commit to brodul/pelican-alchemy that referenced this pull request May 22, 2020
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
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