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.
2 parents ae9f423 + 85e509e commit 75d9df0Copy full SHA for 75d9df0
docs/conf_common.py
@@ -165,3 +165,11 @@
165
google_analytics_id = os.environ.get('CI_GOOGLE_ANALYTICS_ID', None)
166
167
project_homepage = 'https://github.com/espressif/esp-idf'
168
+
169
+# Custom added feature to allow redirecting old URLs
170
+with open('../page_redirects.txt') as f:
171
+ lines = [re.sub(' +', ' ', line.strip()) for line in f.readlines() if line.strip() != '' and not line.startswith('#')]
172
+ for line in lines: # check for well-formed entries
173
+ if len(line.split(' ')) != 2:
174
+ raise RuntimeError('Invalid line in page_redirects.txt: %s' % line)
175
+html_redirect_pages = [tuple(line.split(' ')) for line in lines]
0 commit comments