Skip to content

Commit

Permalink
Move plugins site to a subdirectory
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 8, 2017
1 parent 0ed7d77 commit e45402a
Show file tree
Hide file tree
Showing 44 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion plugins/pkgindex

This file was deleted.

1 change: 0 additions & 1 deletion plugins/pkgindex_compiler

This file was deleted.

1 change: 0 additions & 1 deletion plugins/pkgindex_scan

This file was deleted.

1 change: 0 additions & 1 deletion plugins/pkgindex_zip

This file was deleted.

3 changes: 1 addition & 2 deletions conf.py → site/conf.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-

from __future__ import unicode_literals
import time

# !! This is the configuration of Nikola. !! #
# !! You should edit it to your liking. !! #
Expand Down Expand Up @@ -47,7 +46,7 @@
)

# Output folder -- change if using locally
OUTPUT_FOLDER = '/srv/www/plugins.getnikola.com:80'
# OUTPUT_FOLDER = '/srv/www/plugins.getnikola.com:80'

# Nikola is multilingual!
#
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions site/plugins/pkgindex
1 change: 1 addition & 0 deletions site/plugins/pkgindex_compiler
1 change: 1 addition & 0 deletions site/plugins/pkgindex_scan
1 change: 1 addition & 0 deletions site/plugins/pkgindex_zip
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions site/v7
6 changes: 4 additions & 2 deletions v7/pkgindex_compiler/pkgindex_compiler.py
Expand Up @@ -43,6 +43,8 @@ def dirname_as_title(post, pkg_dir, config):


def _version_from_path(path):
if path.startswith('../'):
path = path[3:]
return int(path.split('/')[0].split('v')[-1])


Expand Down Expand Up @@ -99,7 +101,7 @@ def parse_plugin_file(post, pkg_dir, config):

data['tests'] = _cp_try_get(c, 'Core', 'Tests')
except Exception as e:
raise Exception('Exception while reading plugin config "{0}": {1}'.format(ini, e))
raise Exception('Exception while reading plugin config "{0}": {1}'.format(ini, e)) from e
else:
raise ValueError('Plugin {0} has no .plugin file in the main '
'directory.'.format(plugin))
Expand Down Expand Up @@ -169,7 +171,7 @@ def set_site(self, site):
"""Set site for the compiler."""
# Workaround for plugins site (which includes those plugins, and makes
# tests fail)
if 'PKGINDEX_CONFIG' in self.config:
if 'PKGINDEX_CONFIG' in site.config:
self.config = site.config['PKGINDEX_CONFIG']
self.pi_enabled = True
super(CompilePackageIndexEntries, self).set_site(site)
Expand Down

0 comments on commit e45402a

Please sign in to comment.