posty.renderer.util module

posty.renderer.util.absolute_url_func(site)[source]

Returns a markdown filter function that returns an absolute URL for the given relative URL, simply concatenating config[‘base_url’] with the URL.

posty.renderer.util.markdown_func(site)[source]

Returns a filter function which will return the rendered version of the given Markdown text.

This is done in two passes. First the content is rendered as Jinja, which allows the use of the other filters found here, like media_url and absolute_url. Then, the result of that is rendered as markdown.

posty.renderer.util.media_url_func(site)[source]

Returns a filter function that returns a full media URL for the given file, scoped to the given Site object.

For example, if the Site has its base_url set to ‘/foo/’ then: img/my_picture.jpg -> /foo/media/img/my_picture.jpg