Skip to content
Permalink
Browse files
merged master
  • Loading branch information
ralsina committed Sep 9, 2015
2 parents 8195c36 + 6c10f8f commit b737378bd34fcf8a5f47028ebd18d341fdb84575
Showing 4 changed files with 10 additions and 5 deletions.
@@ -5,6 +5,7 @@ Features
--------

* New option USE_KATEX to switch from MathJax to KaTeX (Experimental).
* Support SVG in galleries (Issue #1605)
* Allow inheriting templates with theme name (Issue #1814)
* Made TAG_PATH translatable (Issue #1914)
* Made CATEGORY_PATH translatable (Issue #1914)
@@ -15,6 +16,7 @@ Features
Bugfixes
--------

* Monitor plugins/ in ``nikola auto`` (Issue #2044)
* Multi-lingual and multi-level directories confused section slug
detection (Issue #2023)
* Use Unicode strings for WordPress comment headers (Issue #2019)
@@ -52,7 +52,7 @@ class ImageProcessor(object):

def resize_image(self, src, dst, max_size, bigger_panoramas=True):
"""Make a copy of the image in the requested size."""
if not Image:
if not Image or os.path.splitext(src)[1] in ['.svg', '.svgz']:
utils.copy_file(src, dst)
return
im = Image.open(src)
@@ -156,7 +156,7 @@ def _execute(self, options, args):

# Do not duplicate entries -- otherwise, multiple rebuilds are triggered
watched = set([
'templates/',
'templates/', 'plugins/',
] + [get_theme_path(name) for name in self.site.THEMES])
for item in self.site.config['post_pages']:
watched.add(os.path.dirname(item[0]))
@@ -563,9 +563,12 @@ def url_from_path(p):
for img, thumb, title in zip(img_list, thumbs, img_titles):
w, h = _image_size_cache.get(thumb, (None, None))
if w is None:
im = Image.open(thumb)
w, h = im.size
_image_size_cache[thumb] = w, h
if os.path.splitext(thumb)[1] in ['.svg', '.svgz']:
w, h = 200, 200
else:
im = Image.open(thumb)
w, h = im.size
_image_size_cache[thumb] = w, h
# Thumbs are files in output, we need URLs
photo_array.append({
'url': url_from_path(img),

0 comments on commit b737378

Please sign in to comment.