|
18 | 18 | #
|
19 | 19 | extensions = [
|
20 | 20 | "myst_parser",
|
| 21 | + "sphinx_copybutton", |
21 | 22 | "sphinx.ext.extlinks",
|
22 | 23 | "sphinxcontrib.autoprogram",
|
| 24 | + "sphinxext.opengraph", |
| 25 | + "sphinxext.rediraffe", |
23 | 26 | ]
|
24 | 27 | root_doc = "index"
|
25 | 28 | source_suffix = [".md", ".rst"]
|
|
87 | 90 | "github_version": "main",
|
88 | 91 | "doc_path": "docs/source",
|
89 | 92 | }
|
| 93 | + |
| 94 | + |
| 95 | +# -- Options for linkcheck builder ------------------------------------------- |
| 96 | +# ref: https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-the-linkcheck-builder |
| 97 | +# |
| 98 | +linkcheck_ignore = [ |
| 99 | + r"(.*)github\.com(.*)#", # javascript based anchors |
| 100 | + r"(.*)/#%21(.*)/(.*)", # /#!forum/jupyter - encoded anchor edge case |
| 101 | + r"https://github.com/[^/]*$", # too many github usernames / searches in changelog |
| 102 | + "https://github.com/jupyterhub/repo2docker/pull/", # too many PRs in changelog |
| 103 | + "https://github.com/jupyterhub/repo2docker/compare/", # too many comparisons in changelog |
| 104 | +] |
| 105 | +linkcheck_anchors_ignore = [ |
| 106 | + "/#!", |
| 107 | + "/#%21", |
| 108 | +] |
| 109 | + |
| 110 | + |
| 111 | +# -- Options for the opengraph extension ------------------------------------- |
| 112 | +# ref: https://github.com/wpilibsuite/sphinxext-opengraph#options |
| 113 | +# |
| 114 | +# This extension help others provide better thumbnails and link descriptions |
| 115 | +# when they link to this documentation from other websites, such as |
| 116 | +# https://discourse.jupyter.org. |
| 117 | +# |
| 118 | +# ogp_site_url is set automatically by RTD |
| 119 | +ogp_image = "_static/images/logo.png" |
| 120 | +ogp_use_first_image = True |
| 121 | + |
| 122 | + |
| 123 | +# -- Options for the rediraffe extension ------------------------------------- |
| 124 | +# ref: https://github.com/wpilibsuite/sphinxext-rediraffe#readme |
| 125 | +# |
| 126 | +# This extensions help us relocated content without breaking links. If a |
| 127 | +# document is moved internally, we should configure a redirect like below. |
| 128 | +# |
| 129 | +rediraffe_branch = "main" |
| 130 | +rediraffe_redirects = { |
| 131 | + # "old-file": "new-folder/new-file-name", |
| 132 | +} |
0 commit comments