Skip to content

Expose relative URL fixer filter in Jinja2 environment #236

@SuibianP

Description

@SuibianP

(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 function fix_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 constructing href attributes, it would be beneficial to export this by default. Preferably the filter could be named url as well to match mkdocs behaviour.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfixedA fix has been submitted

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions