File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ < html >
2+ < head >
3+ < meta http-equiv ="refresh " content ="1; url=./index.html: " />
4+ < script >
5+ window . location . href = "./index.html"
6+ </ script >
7+ </ head >
8+ </ html >
Original file line number Diff line number Diff line change 2626import email
2727import os
2828import pkg_resources
29+ import shutil
2930
3031# If extensions (or modules to document with autodoc) are in another directory,
3132# add these directories to sys.path here. If the directory is relative to the
319320 'pandas' : ('http://pandas.pydata.org/pandas-docs/stable/' , None ),
320321 'python' : ('https://docs.python.org/3' , None ),
321322}
323+
324+ # Static HTML pages, e.g. to support redirects
325+ # See: https://tech.signavio.com/2017/managing-sphinx-redirects
326+ # HTML pages to be copied from source to target
327+ static_html_pages = [
328+ 'bigquery/usage.html' ,
329+ ]
330+
331+ def copy_static_html_pages (app , docname ):
332+ if app .builder .name == 'html' :
333+ for static_html_page in static_html_pages :
334+ target_path = app .outdir + '/' + static_html_page
335+ src_path = app .srcdir + '/' + static_html_page
336+ if os .path .isfile (src_path ):
337+ shutil .copyfile (src_path , target_path )
338+
339+ def setup (app ):
340+ app .connect ('build-finished' , copy_static_html_pages )
You can’t perform that action at this time.
0 commit comments