mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 23:36:59 -04:00
docs - switch to awesome sphinx theme
This commit is contained in:
parent
1de86f95ac
commit
30b27c966f
@ -1,7 +1,6 @@
|
|||||||
parse_cmake
|
parse_cmake
|
||||||
sphinx==7.1.2
|
sphinx==8.2.3
|
||||||
docutils==0.18.1
|
docutils==0.18.1
|
||||||
jinja2==3.1.6
|
jinja2==3.1.6
|
||||||
sphinx-design==0.5.0
|
sphinx-design==0.5.0
|
||||||
furo==2024.8.6
|
sphinxawesome-theme==6.0.0b2
|
||||||
sphinx-copybutton==0.5.2
|
|
17
docs/source/_static/theme-override.css
Normal file
17
docs/source/_static/theme-override.css
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#content a.sd-badge:not(.toc-backref) {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
.dark\:invert {
|
||||||
|
--tw-invert: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-sidebar--primary {
|
||||||
|
width: 500px; /* default is 240px */
|
||||||
|
}
|
||||||
|
|
||||||
|
.md-content {
|
||||||
|
margin-left: 500px; /* match the new sidebar width */
|
||||||
|
}
|
@ -1,11 +0,0 @@
|
|||||||
.content {
|
|
||||||
width: 60em;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.next-page, a.prev-page {
|
|
||||||
color: var(--color-link);
|
|
||||||
}
|
|
||||||
|
|
||||||
a.next-page:hover, a.prev-page:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
@ -16,6 +16,10 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
from dataclasses import asdict
|
||||||
|
from sphinxawesome_theme import ThemeOptions
|
||||||
|
from sphinxawesome_theme.postprocess import Icons
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
@ -38,7 +42,6 @@ extensions = [
|
|||||||
'sphinx.ext.viewcode',
|
'sphinx.ext.viewcode',
|
||||||
'sphinx.ext.autosectionlabel',
|
'sphinx.ext.autosectionlabel',
|
||||||
'sphinx_design',
|
'sphinx_design',
|
||||||
'sphinx_copybutton',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
#autosectionlabel_prefix_document = True
|
#autosectionlabel_prefix_document = True
|
||||||
@ -147,20 +150,23 @@ primary_domain = 'c'
|
|||||||
|
|
||||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||||
# a list of builtin themes.
|
# a list of builtin themes.
|
||||||
html_theme = 'furo'
|
html_theme = 'sphinxawesome_theme'
|
||||||
|
|
||||||
# Theme options are theme-specific and customize the look and feel of a theme
|
# 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
|
# further. For a list of options available for each theme, see the
|
||||||
# documentation.
|
# documentation.
|
||||||
html_theme_options = {
|
html_theme_options = asdict(ThemeOptions(
|
||||||
'navigation_with_keys': True,
|
show_breadcrumbs=False,
|
||||||
'flyout_display': 'attached',
|
main_nav_links= {
|
||||||
'sidebar_hide_name': False,
|
"Lua API": "reference/lua-scripting/index",
|
||||||
'top_of_page_buttons': [],
|
"Postprocessing": "reference/postprocessing/index",
|
||||||
}
|
}
|
||||||
|
))
|
||||||
|
|
||||||
|
html_permalinks_icon = Icons.permalinks_icon
|
||||||
|
|
||||||
html_css_files = [
|
html_css_files = [
|
||||||
"theme.css",
|
"theme-override.css",
|
||||||
"luadoc.css",
|
"luadoc.css",
|
||||||
"figures.css"
|
"figures.css"
|
||||||
]
|
]
|
||||||
@ -176,14 +182,14 @@ def setup(app):
|
|||||||
|
|
||||||
# The name for this set of Sphinx documents. If None, it defaults to
|
# The name for this set of Sphinx documents. If None, it defaults to
|
||||||
# "<project> v<release> documentation".
|
# "<project> v<release> documentation".
|
||||||
html_title = 'OpenMW Docs'
|
html_title = 'OpenMW'
|
||||||
|
|
||||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||||
# html_short_title = 'OpenMW Documentation'
|
# html_short_title = 'OpenMW Documentation'
|
||||||
|
|
||||||
# The name of an image file (relative to this directory) to place at the top
|
# The name of an image file (relative to this directory) to place at the top
|
||||||
# of the sidebar.
|
# of the sidebar.
|
||||||
# html_logo = 'https://gitlab.com/OpenMW/openmw-docs/raw/master/docs/source/_static/images/openmw.png'
|
html_logo = 'https://gitlab.com/OpenMW/openmw-docs/raw/master/docs/source/_static/images/openmw.png'
|
||||||
|
|
||||||
# The name of an image file (within the static path) to use as favicon of the
|
# The name of an image file (within the static path) to use as favicon of the
|
||||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||||
|
@ -3,7 +3,7 @@ Welcome to OpenMW's Documentation!
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Table of Contents
|
:caption: Table of Contents
|
||||||
:maxdepth: 3
|
:maxdepth: 8
|
||||||
|
|
||||||
manuals/index
|
manuals/index
|
||||||
reference/index
|
reference/index
|
||||||
|
Loading…
x
Reference in New Issue
Block a user