nikola.plugins.task.sitemap package

Module contents

Generate a sitemap.

class nikola.plugins.task.sitemap.Sitemap

Bases: :class:`nikola.plugin_categories.LateTask`

Generate a sitemap.

gen_tasks()

Generate a sitemap.

get_lastmod(p)

Get last modification date.

name = 'sitemap'
nikola.plugins.task.sitemap.get_base_path(base)

Return the path of a base URL if it contains one.

>>> get_base_path('http://some.site') == '/'
True
>>> get_base_path('http://some.site/') == '/'
True
>>> get_base_path('http://some.site/some/sub-path') == '/some/sub-path/'
True
>>> get_base_path('http://some.site/some/sub-path/') == '/some/sub-path/'
True