diff options
-rw-r--r-- | commands/account/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/hardware/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/journald/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/logicalfile/doc/conf.py.skel | 2 | ||||
-rwxr-xr-x | commands/make_new.py | 10 | ||||
-rw-r--r-- | commands/networking/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/powermanagement/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/service/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/software/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/storage/doc/conf.py.skel | 2 | ||||
-rw-r--r-- | commands/system/doc/conf.py.skel | 2 |
11 files changed, 19 insertions, 11 deletions
diff --git a/commands/account/doc/conf.py.skel b/commands/account/doc/conf.py.skel index 9aee71a..f29bc8c 100644 --- a/commands/account/doc/conf.py.skel +++ b/commands/account/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/hardware/doc/conf.py.skel b/commands/hardware/doc/conf.py.skel index 08b460a..78aa683 100644 --- a/commands/hardware/doc/conf.py.skel +++ b/commands/hardware/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/journald/doc/conf.py.skel b/commands/journald/doc/conf.py.skel index 867e629..32c88ea 100644 --- a/commands/journald/doc/conf.py.skel +++ b/commands/journald/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/logicalfile/doc/conf.py.skel b/commands/logicalfile/doc/conf.py.skel index eba7932..b359abc 100644 --- a/commands/logicalfile/doc/conf.py.skel +++ b/commands/logicalfile/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/make_new.py b/commands/make_new.py index a2a8111..eeffe1b 100755 --- a/commands/make_new.py +++ b/commands/make_new.py @@ -24,6 +24,7 @@ from sphinx import quickstart RE_COMMAND_NAME = re.compile(r'^([a-z]+(_[a-z]+)*)$') RE_RST_STATEMENT = re.compile(r'^\s*(:[^:]+:.*)') +RE_HTML_THEME = re.compile(r"^html_theme\s*=\s*.*") SETUP_TEMPLATE = \ u"""#!/usr/bin/env python @@ -275,7 +276,14 @@ def make_doc_directory(config, path): 'makefile' : True, 'batchfile' : True} quickstart.generate(sphinx_conf) - os.rename(os.path.join(path, 'conf.py'), os.path.join(path, 'conf.py.skel')) + src_path = os.path.join(path, 'conf.py') + with open(src_path, 'r') as src: + with open(os.path.join(path, 'conf.py.skel'), 'w') as dst: + for line in src.readlines(): + if RE_HTML_THEME.match(line): + line = 'html_theme = "openlmitheme"\n' + dst.write(line) + os.unlink(src_path) write_cmdline(config, os.path.join(path, 'cmdline.rst')) modify_doc_makefile(config, os.path.join(path, 'Makefile')) modify_doc_index(config, os.path.join(path, 'index.rst')) diff --git a/commands/networking/doc/conf.py.skel b/commands/networking/doc/conf.py.skel index f1446f9..4559ed5 100644 --- a/commands/networking/doc/conf.py.skel +++ b/commands/networking/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/powermanagement/doc/conf.py.skel b/commands/powermanagement/doc/conf.py.skel index f1446f9..4559ed5 100644 --- a/commands/powermanagement/doc/conf.py.skel +++ b/commands/powermanagement/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/service/doc/conf.py.skel b/commands/service/doc/conf.py.skel index 29770eb..eabfb6a 100644 --- a/commands/service/doc/conf.py.skel +++ b/commands/service/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/software/doc/conf.py.skel b/commands/software/doc/conf.py.skel index b5d0634..0f17e6f 100644 --- a/commands/software/doc/conf.py.skel +++ b/commands/software/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/storage/doc/conf.py.skel b/commands/storage/doc/conf.py.skel index 91e0905..f889091 100644 --- a/commands/storage/doc/conf.py.skel +++ b/commands/storage/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/commands/system/doc/conf.py.skel b/commands/system/doc/conf.py.skel index 29c1048..1f628c7 100644 --- a/commands/system/doc/conf.py.skel +++ b/commands/system/doc/conf.py.skel @@ -91,7 +91,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'default' +html_theme = "openlmitheme" # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the |