Blog¶
- class ablog.blog.Blog(app)¶
Bases:
collections.abc.Container
Handle blog operations.
Attributes Summary
RSS feed page name.
Methods Summary
page_id
(pagename)Return pagename, trimming
index
from end when found.page_url
(pagename)Return page URL when
blog_baseurl
is set, otherwiseNone
.recent
(num[, docname])Yield num recent posts, excluding the one with docname.
register
(docname, info)Register post docname.
Attributes Documentation
- feed_path¶
RSS feed page name.
Methods Documentation
- page_id(pagename)¶
Return pagename, trimming
index
from end when found.Return value is used as disqus page identifier.
- page_url(pagename)¶
Return page URL when
blog_baseurl
is set, otherwiseNone
.When found,
index.html
is trimmed from the end of the URL.
- recent(num, docname=None, **labels)¶
Yield num recent posts, excluding the one with docname.
- register(docname, info)¶
Register post docname.