Skip to content

Commit

Permalink
Support blank COMMENT_SYSTEM (with 'dummy' file) in the new dispatch …
Browse files Browse the repository at this point in the history
…mechanism (#3544)
  • Loading branch information
Kwpolska committed Apr 28, 2021
1 parent 9816ca9 commit c46af4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions nikola/data/themes/base/templates/comments_helper_dummy.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## -*- coding: utf-8 -*-

<%def name="comment_form(url, title, identifier)">
</%def>

<%def name="comment_link(link, identifier)">
</%def>

<%def name="comment_link_script()">
</%def>
2 changes: 1 addition & 1 deletion nikola/nikola.py
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ def _set_global_context_from_config(self):
self._GLOBAL_CONTEXT['translations'] = self.config.get('TRANSLATIONS')
self._GLOBAL_CONTEXT['license'] = self.config.get('LICENSE')
self._GLOBAL_CONTEXT['search_form'] = self.config.get('SEARCH_FORM')
self._GLOBAL_CONTEXT['comment_system'] = self.config.get('COMMENT_SYSTEM')
self._GLOBAL_CONTEXT['comment_system'] = self.config.get('COMMENT_SYSTEM') or 'dummy'
self._GLOBAL_CONTEXT['comment_system_id'] = self.config.get('COMMENT_SYSTEM_ID')
self._GLOBAL_CONTEXT['site_has_comments'] = bool(self.config.get('COMMENT_SYSTEM'))
self._GLOBAL_CONTEXT['mathjax_config'] = self.config.get(
Expand Down

0 comments on commit c46af4d

Please sign in to comment.