[IMP] redirects: user configuration dir and not srcdir to find redirects file

This commit is contained in:
Victor Feyens 2021-03-10 14:34:01 +01:00
parent d84d4aece8
commit 09eca33691
2 changed files with 2 additions and 2 deletions

View File

@ -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 ===#

View File

@ -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