-
Notifications
You must be signed in to change notification settings - Fork 50
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
Expose relative URL fixer filter in Jinja2 environment #236
Comments
Welcome to this project and thank you!' first issue |
- This filter is imported from mkdocs.utils
The last version on github now contains that filter, visible thanks to @SuibianP Could I ask you to test whether it works correctly for you? |
@fralau Thanks for the addition! Would it be better to take |
OK, I had missed that point! Back to the drawing, board. I implemented the new filter, called |
- New filter is now called `relative_url`.
@SuibianP Test again? |
@fralau Works for me, thanks a lot! |
(Discussed in #199)
MkDocs has the
url
filter (implemented here and exported here) that resolves relative URLs to the current page. mkdocs-macro has a similar functionfix_url
which is not exported to the jinja environment.The direct workaround is adding it to the environment in
define_env
as mentioned here. Nonetheless, as this functionality is frequently used such as when constructinghref
attributes, it would be beneficial to export this by default. Preferably the filter could be namedurl
as well to match mkdocs behaviour.The text was updated successfully, but these errors were encountered: