mirror of
https://github.com/vale981/ablog
synced 2025-03-05 09:11:38 -05:00
Docstring revisions.
This commit is contained in:
parent
fdd3d08c4f
commit
00cf3a0372
1 changed files with 5 additions and 2 deletions
|
@ -251,7 +251,8 @@ class Blog(Container):
|
|||
|
||||
|
||||
def page_id(self, pagename):
|
||||
"""Page identifier for Disqus."""
|
||||
"""Return pagename, trimming :file:`index` from end when found.
|
||||
Return value is used as disqus page identifier."""
|
||||
|
||||
if self.config['blog_baseurl']:
|
||||
if pagename.endswith('index'):
|
||||
|
@ -260,7 +261,9 @@ class Blog(Container):
|
|||
return '/' + pagename + ('/' if pagename else '')
|
||||
|
||||
def page_url(self, pagename):
|
||||
"""Page url for Disqus."""
|
||||
"""Return page URL when :confval:`blog_baseurl` is set, otherwise
|
||||
``None``. When found, :file:`index.html` is trimmed from the end
|
||||
of the URL."""
|
||||
|
||||
if self.config['blog_baseurl']:
|
||||
url = urljoin(self.config['blog_baseurl'], pagename)
|
||||
|
|
Loading…
Add table
Reference in a new issue