Skip to content
Permalink
Browse files

Merge branch 'master' into fix-root-links

[ci skip]

Conflicts:
	CHANGES.txt
  • Loading branch information
Kwpolska committed Jan 18, 2015
2 parents aa3f967 + 9ab9bbe commit 86ec1da28efc89be6af6933a7337f1dacef426b7
@@ -1,17 +1,19 @@
New in master
New in v7.3.0
=============

Features
--------

* Added ``root`` path handler (via Issues #1008, #1573)
* Added RSS feeds to gallery HEAD (part of Issue #786)

Bugfixes
--------

* Links to languages point to site root and not the blog (Issue #1008)
* Brand link is now language-specific (Issue #1573)
* Fixed compatibility with IPython 3.x (Issue #1581)
* Compilers mark tasks as out of date if compiler-specific options and plugins change (Issue #1523)

New in v7.3.0
=============

This file was deleted.

BIN +894 Bytes docs/man/nikola.1.gz
Binary file not shown.
@@ -34,3 +34,8 @@
{{ comments.comment_form(None, permalink, title) }}
{% endif %}
{% endblock %}

{% block extra_head %}
{{ super() }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
{% endblock %}
@@ -34,3 +34,8 @@
${comments.comment_form(None, permalink, title)}
%endif
</%block>

<%block name="extra_head">
${parent.extra_head()}
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
</%block>
@@ -40,6 +40,7 @@

{% block extra_head %}
{{ super() }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
<style type="text/css">
.image-block {
display: inline-block;
@@ -40,6 +40,7 @@ ${comments.comment_form(None, permalink, title)}

<%block name="extra_head">
${parent.extra_head()}
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
<style type="text/css">
.image-block {
display: inline-block;
@@ -41,6 +41,7 @@

{% block extra_head %}
{{ super() }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
<style type="text/css">
.image-block {
display: inline-block;
@@ -41,6 +41,7 @@ ${comments.comment_form(None, permalink, title)}

<%block name="extra_head">
${parent.extra_head()}
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
<style type="text/css">
.image-block {
display: inline-block;
@@ -47,7 +47,12 @@ def _call_nikola_list(site, arguments):
command.append('--conf=' + site.configuration_filename)
command.extend(["list", "--all"])
result = []
for task in subprocess.Popen(command, shell=False, stdout=subprocess.PIPE).stdout.readlines():
if os.name == 'nt':
shell = True
command = ' '.join(command)
else:
shell = False
for task in subprocess.Popen(command, shell=shell, stdout=subprocess.PIPE).stdout.readlines():
result.append(task.decode('utf-8'))
return result

@@ -53,16 +53,18 @@ class CompileMarkdown(PageCompiler):
site = None

def set_site(self, site):
self.enabled_extensions = []
for plugin_info in site.plugin_manager.getPluginsOfCategory("MarkdownExtension"):
if plugin_info.name in site.config['DISABLED_PLUGINS']:
site.plugin_manager.removePluginFromCategory(plugin_info, "MarkdownExtension")
continue

self.enabled_extensions.append(plugin_info.name)
site.plugin_manager.activatePluginByName(plugin_info.name)
plugin_info.plugin_object.set_site(site)
self.extensions.append(plugin_info.plugin_object)
plugin_info.plugin_object.short_help = plugin_info.description

self.enabled_extensions += site.config.get("MARKDOWN_EXTENSIONS")
return super(CompileMarkdown, self).set_site(site)

def compile_html(self, source, dest, is_two_file=True):
@@ -96,3 +98,7 @@ def create_post(self, path, **kw):
fd.write(write_metadata(metadata))
fd.write('-->\n\n')
fd.write(content)

def register_extra_dependencies(self, post):
"""Adds dependency to post object to check .dep file."""
post.add_dependency_uptodate(self.enabled_extensions)
@@ -70,3 +70,7 @@ def create_post(self, path, **kw):
fd.write(write_metadata(metadata))
fd.write('-->\n\n')
fd.write(content)

def register_extra_dependencies(self, post):
"""Adds dependency to post object to check .dep file."""
post.add_dependency_uptodate(self.site.config['PANDOC_OPTIONS'])
@@ -63,6 +63,7 @@ def _read_extra_deps(self, post):
def register_extra_dependencies(self, post):
"""Adds dependency to post object to check .dep file."""
post.add_dependency(lambda: self._read_extra_deps(post), 'fragment')
post.add_dependency_uptodate(self.enabled_plugins)

def compile_html(self, source, dest, is_two_file=True):
"""Compile reSt into HTML."""
@@ -128,12 +129,14 @@ def create_post(self, path, **kw):
fd.write(content)

def set_site(self, site):
self.enabled_plugins = []
for plugin_info in site.plugin_manager.getPluginsOfCategory("RestExtension"):
if plugin_info.name in site.config['DISABLED_PLUGINS']:
site.plugin_manager.removePluginFromCategory(plugin_info, "RestExtension")
continue

site.plugin_manager.activatePluginByName(plugin_info.name)
self.enabled_plugins.append(plugin_info.name)
plugin_info.plugin_object.set_site(site)
plugin_info.plugin_object.short_help = plugin_info.description

@@ -234,7 +234,8 @@ def gen_tasks(self):
folder += '/'
folders.append((folder, ft))

context["folders"] = natsort.natsorted(folders)
context["folders"] = natsort.natsorted(
folders, alg=natsort.ns.F | natsort.ns.IC)
context["crumbs"] = crumbs
context["permalink"] = self.site.link("gallery", gallery, lang)
context["enable_comments"] = self.kw['comments_in_galleries']
@@ -143,8 +143,10 @@ def render_listing(in_name, out_name, input_folder, output_folder, folders=[], f
'crumbs': crumbs,
'permalink': permalink,
'lang': self.kw['default_lang'],
'folders': natsort.natsorted(folders),
'files': natsort.natsorted(files),
'folders': natsort.natsorted(
folders, alg=natsort.ns.F | natsort.ns.IC),
'files': natsort.natsorted(
files, alg=natsort.ns.F | natsort.ns.IC),
'description': title,
'source_link': source_link,
}
@@ -187,7 +187,8 @@ def __init__(
self._tags = {}
for lang in self.translated_to:
self._tags[lang] = natsort.natsorted(
list(set([x.strip() for x in self.meta[lang]['tags'].split(',')])))
list(set([x.strip() for x in self.meta[lang]['tags'].split(',')])),
alg=natsort.ns.F | natsort.ns.IC)
self._tags[lang] = [t for t in self._tags[lang] if t]
if 'draft' in self._tags[lang]:
is_draft = True
@@ -11,4 +11,4 @@ PyRSS2Gen>=1.1
logbook>=0.7.0
blinker>=1.3
setuptools>=5.4.1
natsort>=3.3.0
natsort>=3.5.2
@@ -9,6 +9,7 @@
import re
import sys
import glob
import subprocess


def sed_like_thing(pattern, repl, path):
@@ -34,4 +35,5 @@ def sed_like_thing(pattern, repl, path):
sed_like_thing("release = .*", "release = '{0}'".format(version), os.path.join('docs', 'sphinx', 'conf.py'))
sed_like_thing('__version__ = ".*"', '__version__ = "{0}"'.format(version), os.path.join('nikola', '__init__.py'))
sed_like_thing('New in master', 'New in v{0}'.format(version), 'CHANGES.txt')
os.system("help2man -h help -N --version-string='{0}' nikola > {1}".format(version, os.path.join('docs', 'man', 'nikola.1')))
subprocess.call(["help2man", "-N", "--version-string={0}".format(version), "-n", "static site and blog generator", "-o", os.path.join('docs', 'man', 'nikola.1'), "nikola"])
subprocess.call(["gzip", "-f", os.path.join('docs', 'man', 'nikola.1')])
@@ -1,5 +1,5 @@
[wheel]
universal = 0
universal = 1

[flake8]
ignore=E501
@@ -96,33 +96,6 @@ def expands_symlinks_for_windows():
"\n\tYour best bet is to start again from clean.")


def install_manpages(root, prefix):
try:
man_pages = [
('docs/man/nikola.1', 'share/man/man1/nikola.1'),
]
join = os.path.join
normpath = os.path.normpath
if root is not None:
prefix = os.path.realpath(root) + os.path.sep + prefix
for src, dst in man_pages:
path_dst = join(normpath(prefix), normpath(dst))
try:
os.makedirs(os.path.dirname(path_dst))
except OSError:
pass
rst2man_cmd = ['rst2man.py', 'rst2man']
for rst2man in rst2man_cmd:
try:
subprocess.call([rst2man, src, path_dst])
except OSError:
continue
else:
break
except Exception as e:
print("Not installing the man pages:", e)


def remove_old_files(self):
tree = os.path.join(self.install_lib, 'nikola')
try:
@@ -136,7 +109,6 @@ def run(self):
expands_symlinks_for_windows()
remove_old_files(self)
install.run(self)
install_manpages(self.root, self.prefix)


setup(name='Nikola',
@@ -187,6 +159,7 @@ def run(self):
'docs/manual.txt',
'docs/theming.txt',
'docs/extending.txt']),
('share/man/man1', ['docs/man/nikola.1.gz']),
],
entry_points = {
'console_scripts': [

0 comments on commit 86ec1da

Please sign in to comment.
You can’t perform that action at this time.