[IMP] redirects: user configuration dir and not srcdir to find redirects file
This commit is contained in:
parent
d84d4aece8
commit
09eca33691
2
conf.py
2
conf.py
@ -141,7 +141,7 @@ supported_languages = {
|
||||
}
|
||||
|
||||
# The specifications of redirect rules used by the redirects extension.
|
||||
redirects_file = '../redirects.txt'
|
||||
redirects_file = 'redirects.txt'
|
||||
|
||||
#=== Options for HTML output ===#
|
||||
|
||||
|
@ -12,7 +12,7 @@ TEMPLATE = '<html><head><meta http-equiv="refresh" content="0; url=%s"/></head><
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def generate_redirects(app):
|
||||
path = os.path.join(app.srcdir, app.config.redirects_file)
|
||||
path = os.path.join(app.confdir, app.config.redirects_file)
|
||||
if not os.path.exists(path):
|
||||
logger.warning("Could not find redirects file at '%s'", path)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user