summaryrefslogtreecommitdiff
path: root/sphinx/builders/htmlhelp.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-06 00:04:47 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-09-08 23:11:14 +0900
commit07fd1c068091fe5964b8e8e4a1395471a2f767d3 (patch)
treea560ed291564d29473fd8c9ee15bc459ba23802e /sphinx/builders/htmlhelp.py
parent95534534245db774fa4687e34503b906d21627f5 (diff)
downloadsphinx-git-07fd1c068091fe5964b8e8e4a1395471a2f767d3.tar.gz
Fix #4018: htmlhelp: Add htmlhelp_file_suffix and htmlhelp_link_suffix
Diffstat (limited to 'sphinx/builders/htmlhelp.py')
-rw-r--r--sphinx/builders/htmlhelp.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/sphinx/builders/htmlhelp.py b/sphinx/builders/htmlhelp.py
index 49d48361e..52600ca21 100644
--- a/sphinx/builders/htmlhelp.py
+++ b/sphinx/builders/htmlhelp.py
@@ -19,6 +19,7 @@ from docutils import nodes
from sphinx import addnodes
from sphinx.builders.html import StandaloneHTMLBuilder
+from sphinx.config import string_classes
from sphinx.environment.adapters.indexentries import IndexEntries
from sphinx.locale import __
from sphinx.util import logging
@@ -195,10 +196,10 @@ class HTMLHelpBuilder(StandaloneHTMLBuilder):
def init(self):
# type: () -> None
- StandaloneHTMLBuilder.init(self)
- # the output files for HTML help must be .html only
+ # the output files for HTML help is .html by default
self.out_suffix = '.html'
self.link_suffix = '.html'
+ StandaloneHTMLBuilder.init(self)
# determine the correct locale setting
locale = chm_locales.get(self.config.language)
if locale is not None:
@@ -341,6 +342,8 @@ def setup(app):
app.add_builder(HTMLHelpBuilder)
app.add_config_value('htmlhelp_basename', lambda self: make_filename(self.project), None)
+ app.add_config_value('htmlhelp_file_suffix', None, 'html', string_classes)
+ app.add_config_value('htmlhelp_link_suffix', None, 'html', string_classes)
return {
'version': 'builtin',