Skip to content

Commit

Permalink
Merge pull request #2825 from johannaengland/docs/remove-sphinx-boots…
Browse files Browse the repository at this point in the history
…trap-theme

Use read the docs sphinx theme instead of bootstrap theme
  • Loading branch information
johannaengland committed Feb 28, 2024
2 parents de2a90b + 34979a3 commit 2f19a39
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 55 deletions.
8 changes: 5 additions & 3 deletions doc/_static/custom.css
@@ -1,9 +1,11 @@
/* Custom css for the Sphinx theme in NAV */

a { color: #1f74ad; }
a:hover, a:focus { color: #1f74ad; }
.alert a, .alert .alert-link { color: #1f74ad; }
a, a:hover, a:focus, a:visited, .alert a, .alert .alert-link {color: #1f74ad;}
.wy-menu a:visited, .wy-menu-vertical a:visited, .wy-menu a:hover, .wy-menu-vertical a:hover { color: #d9d9d9; }

pre {
background: #ecf0f1;
}

img {
margin-bottom: 1em;
Expand Down
78 changes: 27 additions & 51 deletions doc/conf.py
Expand Up @@ -10,7 +10,7 @@
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sphinx_bootstrap_theme
import sphinx_rtd_theme
import sys, os

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down Expand Up @@ -52,7 +52,7 @@

# General information about the project.
project = u'NAV'
copyright = u'2012-2021 Uninett AS, 2022-2023 Sikt'
copyright = u'2012-2021 Uninett AS, 2022-2024 Sikt'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -106,7 +106,7 @@

# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
html_theme = 'bootstrap'
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [
Expand All @@ -119,53 +119,23 @@
# further. For a list of options available for each theme, see the
# documentation.
html_theme_options = {
# Navigation bar title. (Default: ``project`` value)
'navbar_title': " ",
# Tab name for entire site. (Default: "Site")
'navbar_site_name': "Contents",
# A list of tuples containing pages or urls to link to.
# Valid tuples should be in the following forms:
# (name, page) # a link to a page
# (name, "/aa/bb", 1) # a link to an arbitrary relative url
# (name, "http://example.com", True) # arbitrary absolute url
# Note the "1" or "True" value above as the third argument to indicate
# an arbitrary url.
#'navbar_links': [
# ("Examples", "examples"),
# ("Link", "http://example.com", True),
# ],
# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': True,
# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': True,
# Global TOC depth for "site" navbar tab. (Default: 1)
# Switching to -1 shows all levels.
'globaltoc_depth': 2,
# Include hidden TOCs in Site navbar?
#
# Note: If this is "false", you cannot have mixed ``:hidden:`` and
# non-hidden ``toctree`` directives in the same page, or else the build
# will break.
#
# Values: "true" (default) or "false"
'globaltoc_includehidden': "true",
# HTML navbar class (Default: "navbar") to attach to <div> element.
# For black navbar, do "navbar navbar-inverse"
'navbar_class': "navbar",
# Fix navigation bar to top of page?
# Values: "true" (default) or "false"
'navbar_fixed_top': "true",
# Location of link to source.
# Options are "nav" (default), "footer" or anything else to exclude.
'source_link_position': "navbar-brand",
# Bootswatch (http://bootswatch.com/) theme.
#
# Options are nothing with "" (default) or the name of a valid theme
# such as "amelia" or "cosmo".
'bootswatch_theme': "flatly",
# Choose Bootstrap version.
# Values: "3" (default) or "2" (in quotes)
'bootstrap_version': "3",
# The maximum depth of the table of contents tree. Set this to -1 to allow
# unlimited depth.
'navigation_depth': 4,
# Only display the logo image, do not display the project name at the top of the
# sidebar
'logo_only': True,
# Location to display Next and Previous buttons. This can be either bottom, top,
# both, or None.
'prev_next_buttons_location': 'both',
# Changes the background of the search area in the navigation bar. The value can be
# anything valid in a CSS background property.
'style_nav_header_background': '#2c3e50',
}

# Do not show Edit on Github link
html_context = {
'display_github': False,
}


Expand All @@ -190,6 +160,12 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = [
'custom.css',
]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
Expand All @@ -215,7 +191,7 @@
# html_split_index = False

# If true, links to the reST sources are added to the pages.
# html_show_sourcelink = True
html_show_sourcelink = False

# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
@@ -1,4 +1,4 @@
-r ../requirements/django32.txt
-r ../requirements/base.txt
-c ../constraints.txt
sphinx-bootstrap-theme==0.8.1
sphinx_rtd_theme>=2.0.0

0 comments on commit 2f19a39

Please sign in to comment.