Skip to content

Commit

Permalink
pkgindex: implement supported_extensions
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Apr 2, 2017
1 parent 5e173f6 commit 074be63
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
3 changes: 0 additions & 3 deletions site/conf.py
Expand Up @@ -242,12 +242,9 @@
("posts/*.rst", "posts", "post.tmpl"),
("posts/*.md", "posts", "post.tmpl"),
("posts/*.plugin", "posts", "post.tmpl"),
("posts/*.html", "posts", "post.tmpl"),
)
PAGES = (
("pages/*.rst", "", "story.tmpl"),
("pages/*.txt", "", "story.tmpl"),
("pages/*.html", "", "story.tmpl"),
)


Expand Down
2 changes: 1 addition & 1 deletion v7/pkgindex/pkgindex.plugin
Expand Up @@ -8,6 +8,6 @@ MinVersion = 7.8.2

[Documentation]
Author = Chris Warrick
Version = 0.2.0
Version = 0.2.1
Website = https://plugins.getnikola.com/
Description = Generate package indexes (meta-plugin)
2 changes: 1 addition & 1 deletion v7/pkgindex_compiler/pkgindex_compiler.plugin
Expand Up @@ -8,6 +8,6 @@ MinVersion = 7.8.1+

[Documentation]
Author = Chris Warrick, Roberto Alsina
Version = 0.2.0
Version = 0.2.1
Website = https://plugins.getnikola.com/
Description = Compile pages in package indexes
2 changes: 1 addition & 1 deletion v7/pkgindex_scan/pkgindex_scan.plugin
Expand Up @@ -8,6 +8,6 @@ MinVersion = 7.8.1+

[Documentation]
Author = Chris Warrick
Version = 0.2.0
Version = 0.2.1
Website = https://plugins.getnikola.com/
Description = Scan packages for package indexes
6 changes: 6 additions & 0 deletions v7/pkgindex_scan/pkgindex_scan.py
Expand Up @@ -90,3 +90,9 @@ def scan(self):
self.site.pkgindex_entries[topdir].append(post)

return timeline

def supported_extensions(self):
"""Return a list of supported file extensions, or None if such a list isn't known beforehand."""
if 'PKGINDEX_CONFIG' not in self.site.config:
return None
return [self.site.config['PKGINDEX_CONFIG']['extension']]
2 changes: 1 addition & 1 deletion v7/pkgindex_zip/pkgindex_zip.plugin
Expand Up @@ -8,6 +8,6 @@ MinVersion = 7.8.1+

[Documentation]
Author = Chris Warrick
Version = 0.2.0
Version = 0.2.1
Website = https://plugins.getnikola.com/
Description = Generate ZIP (and JSON) files for package indexes

0 comments on commit 074be63

Please sign in to comment.