def setup(app): rev = get_github_rev() submods = get_submodules() # links to files or folders on the GitHub app.add_role('idf', github_link('tree', rev, submods, '/', app.config)) app.add_role('idf_file', github_link('blob', rev, submods, '/', app.config)) app.add_role('idf_raw', github_link('raw', rev, submods, '/', app.config)) app.add_role('component', github_link('tree', rev, submods, '/components/', app.config)) app.add_role('component_file', github_link('blob', rev, submods, '/components/', app.config)) app.add_role('component_raw', github_link('raw', rev, submods, '/components/', app.config)) app.add_role('example', github_link('tree', rev, submods, '/examples/', app.config)) app.add_role('example_file', github_link('blob', rev, submods, '/examples/', app.config)) app.add_role('example_raw', github_link('raw', rev, submods, '/examples/', app.config)) # link to the current documentation file in specific language version app.add_role('link_to_translation', link_to_translation) app.add_node(translation_link) app.add_post_transform(TranslationLinkNodeTransform) return { 'parallel_read_safe': True, 'parallel_write_safe': True, 'version': '0.5' }
if len(line.split(' ')) != 2: raise RuntimeError("Invalid line in page_redirects.txt: %s" % line) html_redirect_pages = [tuple(line.split(' ')) for line in lines] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'sphinx_idf_theme' # context used by sphinx_idf_theme html_context = { "display_github": True, # Add 'Edit on Github' link instead of 'View page source' "github_user": "******", "github_repo": "esp-idf", "github_version": get_github_rev(), } # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title.
if len(line.split(' ')) != 2: raise RuntimeError('Invalid line in page_redirects.txt: %s' % line) html_redirect_pages = [tuple(line.split(' ')) for line in lines] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. html_theme = 'sphinx_idf_theme' # context used by sphinx_idf_theme html_context = { 'display_github': True, # Add 'Edit on Github' link instead of 'View page source' 'github_user': '******', 'github_repo': 'esp-idf', 'github_version': get_github_rev(), } # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. # html_theme_path = [] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation". # html_title = None # A shorter title for the navigation bar. Default is the same as html_title.