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
|
||||
sphinx==7.1.2
|
||||
sphinx==8.2.3
|
||||
docutils==0.18.1
|
||||
jinja2==3.1.6
|
||||
sphinx-design==0.5.0
|
||||
furo==2024.8.6
|
||||
sphinx-copybutton==0.5.2
|
||||
sphinxawesome-theme==6.0.0b2
|
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 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,
|
||||
# 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.
|
||||
@ -38,7 +42,6 @@ extensions = [
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.autosectionlabel',
|
||||
'sphinx_design',
|
||||
'sphinx_copybutton',
|
||||
]
|
||||
|
||||
#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
|
||||
# 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
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
html_theme_options = {
|
||||
'navigation_with_keys': True,
|
||||
'flyout_display': 'attached',
|
||||
'sidebar_hide_name': False,
|
||||
'top_of_page_buttons': [],
|
||||
html_theme_options = asdict(ThemeOptions(
|
||||
show_breadcrumbs=False,
|
||||
main_nav_links= {
|
||||
"Lua API": "reference/lua-scripting/index",
|
||||
"Postprocessing": "reference/postprocessing/index",
|
||||
}
|
||||
))
|
||||
|
||||
html_permalinks_icon = Icons.permalinks_icon
|
||||
|
||||
html_css_files = [
|
||||
"theme.css",
|
||||
"theme-override.css",
|
||||
"luadoc.css",
|
||||
"figures.css"
|
||||
]
|
||||
@ -176,14 +182,14 @@ def setup(app):
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<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.
|
||||
# html_short_title = 'OpenMW Documentation'
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# 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
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
|
@ -3,7 +3,7 @@ Welcome to OpenMW's Documentation!
|
||||
|
||||
.. toctree::
|
||||
:caption: Table of Contents
|
||||
:maxdepth: 3
|
||||
:maxdepth: 8
|
||||
|
||||
manuals/index
|
||||
reference/index
|
||||
|
Loading…
x
Reference in New Issue
Block a user