We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0dd9ce commit 85e509eCopy full SHA for 85e509e
docs/conf_common.py
@@ -171,3 +171,11 @@
171
google_analytics_id = os.environ.get('CI_GOOGLE_ANALYTICS_ID', None)
172
173
project_homepage = 'https://github.com/espressif/esp-idf'
174
+
175
+# Custom added feature to allow redirecting old URLs
176
+with open('../page_redirects.txt') as f:
177
+ lines = [re.sub(' +', ' ', line.strip()) for line in f.readlines() if line.strip() != '' and not line.startswith('#')]
178
+ for line in lines: # check for well-formed entries
179
+ if len(line.split(' ')) != 2:
180
+ raise RuntimeError('Invalid line in page_redirects.txt: %s' % line)
181
+html_redirect_pages = [tuple(line.split(' ')) for line in lines]
0 commit comments