posty.renderer package¶
Submodules¶
Module contents¶
-
class
posty.renderer.
AtomRenderer
(site, output_path='build')[source]¶ Bases:
posty.renderer.feed.FeedRenderer
Renderer that outputs an Atom feed XML file
-
filename
= 'atom.xml'¶
-
-
class
posty.renderer.
HtmlRenderer
(site, output_path='build')[source]¶ Bases:
posty.renderer.base.Renderer
Renderer that outputs HTML files
-
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_pathIf
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
Renders all of the per-tag multi-post pages, N per page
-
-
class
posty.renderer.
JsonRenderer
(site, output_path='build')[source]¶ Bases:
posty.renderer.base.Renderer
Renderer that outputs a JSON representation of the Site to
site.json
within the output directory
-
class
posty.renderer.
RssRenderer
(site, output_path='build')[source]¶ Bases:
posty.renderer.feed.FeedRenderer
Renderer that outputs a RSS feed XML file
-
filename
= 'rss.xml'¶
-
-
class
posty.renderer.
Posty1RedirectRenderer
(site, output_path='build')[source]¶ Bases:
posty.renderer.base.Renderer
Renderer which creates pages to redirect old Posty1 URLs to new Posty2 URLs
Old Posty1 post URLs are in the form of: /:year/:month/:old_slug.html
Posty2 URLs are in the form of: /:year/:month/:slug/index.html