From 57aceed4edb543280929dfbc50b5eadff996ab66 Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Thu, 22 Aug 2013 08:51:06 +0100 Subject: [PATCH] Add and document html_extra_path option. --- doc/config.rst | 18 ++++++++++++++---- sphinx/config.py | 1 + sphinx/quickstart.py | 5 +++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/config.rst b/doc/config.rst index 24334f363..d6aa96452 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -509,10 +509,11 @@ that use Sphinx' HTMLWriter class. .. confval:: html_static_path - A list of paths that contain custom static files (such as style sheets or - script files). Relative paths are taken as relative to the configuration - directory. They are copied to the output directory after the theme's static - files, so a file named :file:`default.css` will overwrite the theme's + A list of paths that contain custom static files (such as style + sheets or script files). Relative paths are taken as relative to + the configuration directory. They are copied to the output's + :file:`_static` directory after the theme's static files, so a file + named :file:`default.css` will overwrite the theme's :file:`default.css`. .. versionchanged:: 0.4 @@ -521,6 +522,15 @@ that use Sphinx' HTMLWriter class. .. versionchanged:: 1.0 The entries in :confval:`html_static_path` can now be single files. +.. confval:: html_extra_path + + A list of paths that contain extra files (such as + :file:`robots.txt` or :file:`.htaccess`). Relative paths are taken + as relative to the configuration directory. They are copied to the + output directory, and will overwrite any existing generated file. + + .. versionadded:: 1.2 + .. confval:: html_last_updated_fmt If this is not the empty string, a 'Last updated on:' timestamp is inserted diff --git a/sphinx/config.py b/sphinx/config.py index a59012117..051b9eef5 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -86,6 +86,7 @@ class Config(object): html_logo = (None, 'html'), html_favicon = (None, 'html'), html_static_path = ([], 'html'), + html_extra_path = ([], 'html'), # the real default is locale-dependent html_last_updated_fmt = (None, 'html'), html_use_smartypants = (True, 'html'), diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py index 73926f82e..7124184e6 100644 --- a/sphinx/quickstart.py +++ b/sphinx/quickstart.py @@ -171,6 +171,11 @@ html_theme = 'default' # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['%(dot)sstatic'] +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. #html_last_updated_fmt = '%%b %%d, %%Y'