Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Include PHP in sitemaps
  • Loading branch information
da2x committed Jul 27, 2015
1 parent 980312b commit 0de18d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -12,6 +12,7 @@ Features
Bugfixes
--------

* Include .php files in sitemaps
* Retry all client errors (4xx) to HEAD as GET reques when checking remote links
* Graceful fallback in ``nikola serve --detach`` on Windows (Issue #1913)
* Don't auto-rebuild on changes to ".foo" or "foo~" or changes in folders
Expand Down
4 changes: 2 additions & 2 deletions nikola/plugins/task/sitemap/__init__.py
Expand Up @@ -117,7 +117,7 @@ def gen_tasks(self):
"strip_indexes": self.site.config["STRIP_INDEXES"],
"index_file": self.site.config["INDEX_FILE"],
"sitemap_include_fileless_dirs": self.site.config["SITEMAP_INCLUDE_FILELESS_DIRS"],
"mapped_extensions": self.site.config.get('MAPPED_EXTENSIONS', ['.atom', '.html', '.htm', '.xml', '.rss']),
"mapped_extensions": self.site.config.get('MAPPED_EXTENSIONS', ['.atom', '.html', '.htm', '.php', '.xml', '.rss']),
"robots_exclusions": self.site.config["ROBOTS_EXCLUSIONS"],
"filters": self.site.config["FILTERS"],
"translations": self.site.config["TRANSLATIONS"],
Expand Down Expand Up @@ -174,7 +174,7 @@ def scan_locs():
filehead = fh.read(1024)
fh.close()

if path.endswith('.html') or path.endswith('.htm'):
if path.endswith('.html') or path.endswith('.htm') or path.endswith('.php'):
""" ignores "html" files without doctype """
if b'<!doctype html' not in filehead.lower():
continue
Expand Down

0 comments on commit 0de18d4

Please sign in to comment.