From 70fd3c6d313bae1e1d33f12e396e55005c34a86b Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Sat, 23 Aug 2014 09:04:21 +0900 Subject: [PATCH] :confval:`templates_path` is automatically added to :confval:`exclude_patterns` to avoid reading autosummary rst templates in the templates directory. Closes #1543 --- CHANGES | 3 +++ doc/config.rst | 4 ++++ sphinx/environment.py | 1 + 3 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index f824827f7..3123cf678 100644 --- a/CHANGES +++ b/CHANGES @@ -15,6 +15,9 @@ Incompatible changes * PR#269, #1476: replace `` tag by ``. User customized stylesheets should be updated If the css contain some styles for `` tag. Thanks to Takeshi Komiya. +* #1543: :confval:`templates_path` is automatically added to + :confval:`exclude_patterns` to avoid reading autosummary rst templates in the + templates directory. Features added -------------- diff --git a/doc/config.rst b/doc/config.rst index ead0d4448..6c00e6fe4 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -120,6 +120,10 @@ General configuration builtin/theme-specific templates). Relative paths are taken as relative to the configuration directory. + .. versionchanged:: 1.3 + As these files are not meant to be built, they are automatically added to + :confval:`exclude_patterns`. + .. confval:: template_bridge A string with the fully-qualified name of a callable (or simply a class) that diff --git a/sphinx/environment.py b/sphinx/environment.py index 2dfedcd04..d51e7a168 100644 --- a/sphinx/environment.py +++ b/sphinx/environment.py @@ -339,6 +339,7 @@ class BuildEnvironment: """ matchers = compile_matchers( config.exclude_patterns[:] + + config.templates_path + config.html_extra_path + ['**/_sources', '.#*'] )