Skip to content

Commit

Permalink
merged master
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Sep 9, 2015
2 parents 8195c36 + 6c10f8f commit b737378
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion nikola/image_processing.py
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/command/auto/__init__.py
Expand Up @@ -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]))
Expand Down
9 changes: 6 additions & 3 deletions nikola/plugins/task/galleries.py
Expand Up @@ -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),
Expand Down

0 comments on commit b737378

Please sign in to comment.