Skip to content

Commit

Permalink
Fix #2597 — allow disabling code.css genereation
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Dec 15, 2016
1 parent 08f2c0b commit b3ae887
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,8 @@ New in master
Bugfixes
--------

* If ``CODE_COLOR_SCHEME`` is empty, don’t generate ``code.css``
(Issue #2597)
* Don’t warn about ``nikolademo`` DISQUS account when comments are
disabled (Issue #2588)
* Make ``data`` from global context available to templated shortcodes
Expand Down
2 changes: 1 addition & 1 deletion nikola/conf.py.in
Expand Up @@ -710,7 +710,7 @@ IMAGE_FOLDERS = {'images': 'images'}
# SHOW_INDEX_PAGE_NAVIGATION = False

# Color scheme to be used for code blocks. If your theme provides
# "assets/css/code.css" this is ignored.
# "assets/css/code.css" this is ignored. Leave empty to disable.
# Can be any of:
# algol
# algol_nu
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/copy_assets.py
Expand Up @@ -79,7 +79,7 @@ def gen_tasks(self):
yield utils.apply_filters(task, kw['filters'])

# Check whether or not there is a code.css file around.
if not code_css_input:
if not code_css_input and kw['code_color_scheme']:
def create_code_css():
from pygments.formatters import get_formatter_by_name
formatter = get_formatter_by_name('html', style=kw["code_color_scheme"])
Expand Down

0 comments on commit b3ae887

Please sign in to comment.