posty.renderer.html module

class posty.renderer.html.HtmlRenderer(site, output_path='build')[source]

Bases: posty.renderer.base.Renderer

Renderer that outputs HTML files

render_page(page, template_name='page.html')[source]
Parameters:page – a Page object
render_post(post, template_name='post.html')[source]
Parameters:post – a Post object
render_posts(posts, prefix='', template_name='posts.html')[source]

Render a list of posts as sets of pages where each page has num_posts_per_page posts. Each page of posts will be rendered to the path page/:page/index.html relative to the Renderer output_path

If prefix is given, add that will be put in between the output_path and page path. For example if the prefix is ‘tags/foo/’ then a page path would look like ‘tags/foo/page/:page/index.html’

render_site()[source]

Given a Site object, render all of its components

Parameters:site – a loaded Site object
render_site_posts()[source]

Renders all of the multi-post pages, N per page

render_site_tags(template_name='posts.html')[source]

Renders all of the per-tag multi-post pages, N per page