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
Absolute paths in path handlers #2879
Absolute paths in path handlers #2879
Conversation
nikola/nikola.py
Outdated
The returned value is always a path relative to output, like | ||
"categories/whatever.html" | ||
The returned value is either a path relative to output, like "categories/whatever.html", or | ||
an absolute URL ("https://en.wikipedia.org/wiki/Nikola"), if path handler returns a string. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(A better sample URL would be https://getnikola.com/
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, will fix in a sec
Thanks for contributing to Nikola! 🎉 |
Great! Thank you for handling the issue in the fastest way possible. BTW, what are the plans for the 8.0.0 milestone? A deadline or something? Currently I use a patched 7.8.9, which means I can't publish the plugin (external link bibliography) officially. |
There is currently no planned release date; however it will take a few more months to complete our plans. You can release your plugin to the repo as v8-only, telling interested users that they need either a manual patch, or the development version from GitHub. |
Ok, thanks for clarifying. |
The branch does the following changes to Nikola.path:
Makes try..except more granular, i.e. the exception only wraps the code that is expected to throw KeyError here.
If path handler returns a string the it is considered to be a complete absolute URL not requiring any processing.
Fixes #2876