forked from etingof/pysmi
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
111 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,7 @@ | |
sitemap_url_scheme = "{link}" | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = [".templates"] | ||
templates_path = ["_templates"] | ||
|
||
# The suffix(es) of source filenames. | ||
# You can specify multiple suffix as a list of string: | ||
|
@@ -56,7 +56,7 @@ | |
master_doc = "index" | ||
|
||
# General information about the project. | ||
project = "SNMP SMI Compiler" | ||
project = "PySMI 1.4 Documentation" | ||
copyright = "2015-2020, Ilya Etingof; © Copyright 2022-2024, LeXtudio Inc." | ||
author = "LeXtudio Inc. <[email protected]>" | ||
|
||
|
@@ -103,6 +103,7 @@ | |
|
||
# The name of the Pygments (syntax highlighting) style to use. | ||
pygments_style = "sphinx" | ||
pygments_dark_style = "monokai" | ||
|
||
# A list of ignored prefixes for module index sorting. | ||
# modindex_common_prefix = [] | ||
|
@@ -125,16 +126,39 @@ | |
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
html_theme = "sphinx_rtd_theme" | ||
html_theme = "furo" | ||
|
||
# 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 = { 'collapse_navigation': False } | ||
html_theme_options = { | ||
"source_repository": "https://github.com/lextudio/pysmi", | ||
"source_branch": "main", | ||
"source_directory": "docs/source/", | ||
"light_css_variables": { | ||
"color-brand-primary": "white", | ||
"color-brand-content": "#CC3333", | ||
"color-admonition-background": "blue", | ||
}, | ||
"footer_icons": [ | ||
{ | ||
"name": "GitHub", | ||
"url": "https://github.com/lextudio/pysmi", | ||
"html": "", | ||
"class": "fa-brands fa-solid fa-github fa-2x", | ||
}, | ||
], | ||
} | ||
|
||
html_css_files = [ | ||
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/fontawesome.min.css", | ||
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/solid.min.css", | ||
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css", | ||
] | ||
|
||
# The name for this set of Sphinx documents. If None, it defaults to | ||
# "<project> v<release> documentation". | ||
# html_title = None | ||
html_title = "PySMI 1.4 Documentation" | ||
|
||
# A shorter title for the navigation bar. Default is the same as html_title. | ||
# html_short_title = None | ||
|
@@ -146,12 +170,12 @@ | |
# 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 | ||
# pixels large. | ||
html_favicon = ".static/favicon.ico" | ||
html_favicon = "_static/favicon.ico" | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = [".static"] | ||
html_static_path = ["_static"] | ||
|
||
# Custom CSS theme | ||
# html_style = 'css/rtdimproved.css' | ||
|
@@ -323,3 +347,13 @@ | |
napoleon_use_ivar = False | ||
napoleon_use_param = False | ||
napoleon_use_rtype = False | ||
|
||
|
||
def setup(app): | ||
on_rtd = os.environ.get("READTHEDOCS", None) == "True" | ||
if not on_rtd: | ||
"""Insert Google Analytics tracker | ||
Based on this Stackoverflow suggestion: https://stackoverflow.com/a/41885884 | ||
""" | ||
app.add_js_file("https://www.googletagmanager.com/gtag/js?id=G-DYQGY4MKR3") | ||
app.add_js_file("google_analytics_tracker.js") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters