|
16 | 16 | sys.path.insert(0, os.path.abspath(os.path.dirname(os.path.abspath("."))))
|
17 | 17 | from distutils.version import LooseVersion # noqa
|
18 | 18 |
|
19 |
| -import sphinx_material # noqa |
| 19 | +import sphinx_immaterial # noqa |
20 | 20 | from recommonmark.transform import AutoStructify # noqa
|
21 | 21 |
|
22 | 22 | FORCE_CLASSIC = os.environ.get("SPHINX_MATERIAL_FORCE_CLASSIC", False)
|
|
30 | 30 | copyright = "2022, Flux RESTful API Developers"
|
31 | 31 | author = "@vsoch"
|
32 | 32 |
|
33 |
| -# The full version, including alpha/beta/rc tags |
34 |
| -release = LooseVersion(sphinx_material.__version__).vstring |
35 | 33 |
|
36 | 34 | # -- General configuration ---------------------------------------------------
|
37 | 35 |
|
|
48 | 46 | "sphinx.ext.todo",
|
49 | 47 | "sphinx.ext.mathjax",
|
50 | 48 | "sphinx.ext.viewcode",
|
| 49 | + "sphinx_immaterial.theme_result", |
| 50 | + "sphinx_immaterial.kbd_keys", |
| 51 | + "sphinx_immaterial.apidoc.format_signatures", |
| 52 | + "sphinx_immaterial.apidoc.json.domain", |
| 53 | + "sphinx_immaterial.apidoc.python.apigen", |
| 54 | + "sphinx_immaterial.graphviz", |
51 | 55 | "nbsphinx",
|
52 | 56 | "sphinx_markdown_tables",
|
53 |
| - "sphinx_gallery.gen_gallery", |
54 | 57 | "sphinx_copybutton",
|
55 | 58 | "sphinx_search.extension",
|
56 | 59 | ]
|
57 | 60 |
|
58 |
| - |
59 | 61 | autosummary_generate = True
|
60 | 62 | autoclass_content = "class"
|
61 | 63 |
|
|
102 | 104 | # Allows us to add to the default template
|
103 | 105 | templates_path = ["_templates"]
|
104 | 106 |
|
105 |
| -extensions.append("sphinx_material") |
106 |
| -html_theme_path = sphinx_material.html_theme_path() |
107 |
| -html_context = sphinx_material.get_html_context() |
108 |
| -html_theme = "sphinx_material" |
| 107 | +extensions.append("sphinx_immaterial") |
| 108 | +html_theme = "sphinx_immaterial" |
109 | 109 | html_css_files = ["custom.css"]
|
110 | 110 |
|
111 | 111 | # Custom sphinx material variables
|
112 | 112 | theme_logo_icon = "images/oras.png"
|
113 | 113 |
|
114 | 114 |
|
| 115 | +# material theme options (see theme.conf for more information) |
115 | 116 | html_theme_options = {
|
116 |
| - "base_url": "http://flux-framework.github.io/flux-restful-api/", |
| 117 | + "icon": { |
| 118 | + "repo": "fontawesome/brands/github", |
| 119 | + "edit": "material/file-edit-outline", |
| 120 | + }, |
117 | 121 | "repo_url": "https://github.com/flux-framework/flux-restful-api/",
|
118 |
| - "repo_name": "Flux RESTful API", |
119 |
| - "html_minify": False, |
120 |
| - "html_prettify": True, |
121 |
| - "css_minify": False, |
122 |
| - # https://fonts.google.com/icons?icon.query=cycle |
123 |
| - "logo_icon": "cycle", |
| 122 | + "repo_name": "Flux RESTFul API", |
124 | 123 | "repo_type": "github",
|
125 |
| - "globaltoc_depth": 2, |
126 |
| - # red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, deep-orange, brown, grey, blue-grey, and white. |
127 |
| - "color_primary": "blue", |
128 |
| - # red, pink, purple, deep-purple, indigo, blue, light-blue, cyan, teal, green, light-green, lime, yellow, amber, orange, and deep-orange. |
129 |
| - "color_accent": "blue", |
130 |
| - "touch_icon": "images/logo.png", |
131 |
| - "theme_color": "#036291", |
132 |
| - "master_doc": False, |
133 |
| - "nav_links": [ |
| 124 | + "edit_uri": "blob/main/docs", |
| 125 | + "globaltoc_collapse": True, |
| 126 | + "features": [ |
| 127 | + "navigation.expand", |
| 128 | + "navigation.tabs", |
| 129 | + "toc.integrate", |
| 130 | + "navigation.sections", |
| 131 | + "navigation.instant", |
| 132 | + "header.autohide", |
| 133 | + "navigation.top", |
| 134 | + "navigation.tracking", |
| 135 | + "search.highlight", |
| 136 | + "search.share", |
| 137 | + "toc.follow", |
| 138 | + "toc.sticky", |
| 139 | + "content.tabs.link", |
| 140 | + "announce.dismiss", |
| 141 | + ], |
| 142 | + "palette": [ |
| 143 | + { |
| 144 | + "media": "(prefers-color-scheme: light)", |
| 145 | + "scheme": "default", |
| 146 | + "primary": "blue", |
| 147 | + "accent": "light-blue", |
| 148 | + "toggle": { |
| 149 | + "icon": "material/lightbulb-outline", |
| 150 | + "name": "Switch to dark mode", |
| 151 | + }, |
| 152 | + }, |
134 | 153 | {
|
135 |
| - "href": "https://flux-framework.org/", |
136 |
| - "internal": False, |
137 |
| - "title": "Flux Framework", |
| 154 | + "media": "(prefers-color-scheme: dark)", |
| 155 | + "scheme": "slate", |
| 156 | + "primary": "blue", |
| 157 | + "accent": "light-blue", |
| 158 | + "toggle": { |
| 159 | + "icon": "material/lightbulb", |
| 160 | + "name": "Switch to light mode", |
| 161 | + }, |
138 | 162 | },
|
| 163 | + ], |
| 164 | + # BEGIN: version_dropdown |
| 165 | + "version_dropdown": False, |
| 166 | + "version_info": [ |
139 | 167 | {
|
140 |
| - "href": "https://github.com/flux-framework", |
141 |
| - "internal": False, |
142 |
| - "title": "Flux Framework on GitHub", |
| 168 | + "version": "https://sphinx-immaterial.rtfd.io", |
| 169 | + "title": "ReadTheDocs", |
| 170 | + "aliases": [], |
143 | 171 | },
|
144 | 172 | {
|
145 |
| - "href": "https://github.com/flux-framework/flux-restful-api", |
146 |
| - "internal": False, |
147 |
| - "title": "Flux RESTful API on GitHub", |
| 173 | + "version": "https://jbms.github.io/sphinx-immaterial", |
| 174 | + "title": "Github Pages", |
| 175 | + "aliases": [], |
148 | 176 | },
|
149 | 177 | ],
|
150 |
| - "heroes": { |
151 |
| - "index": "Flux RESTful API", |
152 |
| - "customization": "Flux RESTful API", |
153 |
| - }, |
154 |
| - # Include the version dropdown top right? (e.g., if we use readthedocs) |
155 |
| - "version_dropdown": False, |
156 |
| - # Format of this is dict with [label,path] |
157 |
| - # Since we are rendering on gh-pages without readthedocs, we don't |
158 |
| - # have versions |
159 |
| - # "version_json": "_static/versions.json", |
160 |
| - # "version_info": { |
161 |
| - # "Release": "https://online-ml.github.io/viz/", |
162 |
| - # "Development": "https://online-ml.github.io/viz/devel/", |
163 |
| - # "Release (rel)": "/viz/", |
164 |
| - # "Development (rel)": "/viz/devel/", |
165 |
| - # }, |
166 |
| - # Do NOT strip these classes from tables! |
167 |
| - "table_classes": ["plain"], |
| 178 | + # END: version_dropdown |
| 179 | + "toc_title_is_page_title": True, |
| 180 | + # BEGIN: social icons |
| 181 | + "social": [ |
| 182 | + { |
| 183 | + "icon": "fontawesome/brands/github", |
| 184 | + "link": "https://github.com/flux-framework/flux-restful-api", |
| 185 | + "name": "Flux RESTFul API on GitHub", |
| 186 | + }, |
| 187 | + { |
| 188 | + "icon": "material/chart-donut-variant", |
| 189 | + "link": "https://flux-framework.org/", |
| 190 | + "name": "Flux Framework", |
| 191 | + }, |
| 192 | + ], |
| 193 | + # END: social icons |
168 | 194 | }
|
169 | 195 |
|
| 196 | +todo_include_todos = True |
| 197 | +sphinx_immaterial_icon_path = html_static_path |
| 198 | +sphinx_immaterial_bundle_source_maps = True |
| 199 | + |
170 | 200 | if FORCE_CLASSIC:
|
171 | 201 | print("!!!!!!!!! Forcing classic !!!!!!!!!!!")
|
172 | 202 | html_theme = "classic"
|
|
0 commit comments