Skip to content

Commit

Permalink
Merge pull request #233 from mraniki/dev
Browse files Browse the repository at this point in the history
📝 Docs
  • Loading branch information
mraniki authored Jul 8, 2023
2 parents 961509a + 4c54ff1 commit e2bd876
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 1,640 deletions.
181 changes: 176 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,194 @@
copyright = '2023, mraniki'
author = 'mraniki'


# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinx.ext.intersphinx'
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx_copybutton',
'myst_parser',
# 'sphinx_inline_tabs',
# 'sphinx_reredirects',
# 'sphinx_design',
'notfound.extension'

]

templates_path = ['_templates']
exclude_patterns = []
source_suffix = ['.rst', '.md']


# -- Napoleon Settings -----------------------------------------------------
napoleon_google_docstring = True
napoleon_numpy_docstring = False
napoleon_include_init_with_doc = False
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = False
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = True
napoleon_use_param = True
napoleon_use_rtype = True
napoleon_use_keyword = True
autodoc_member_order = 'bysource'
add_module_names = False

master_doc = 'index'

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "furo"
html_static_path = ['_static']
# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = "nature"
html_theme = "bootstrap"
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# (Optional) Logo. Should be small enough to fit the navbar (ideally 24x24).
# Path should be relative to the ``_static`` files directory.
# html_logo = "_static/logo-white.png"
# html_favicon = "_static/favicon.png"

html_copy_source = False
html_show_sourcelink = False


# Redirect URLs
# "<source>": "<target>"
#redirects = {}


# Theme options are theme-specific and customize the look and feel of a
# theme further.

html_theme_options = {
# Tab name for entire site. (Default: "Site")
#'navbar_site_name': "Table of 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': [
# ("_menu", "Essentials", [
# ("TalkyTrader", "index"),
# ("_divider", ),
# ("_menu", "Installation", "home/installation", [
# ("Local Walkthrough", "home/guides/local"),
# ("Docker Walkthrough", "home/guides/docker"),
# ]),
# ("Environment Variables", "home/environmental"),
# ("Knowledgebase/FAQ", "home/kb"),
# ]),
# ("_divider", ),
# ("Bugs/Issues", "https://github.com/mraniki/tt/issues"),
# ],

# Render the next and previous page links in navbar. (Default: true)
'navbar_sidebarrel': False,

# Render the current pages TOC in the navbar. (Default: true)
'navbar_pagenav': False,

# Tab name for the current pages TOC. (Default: "Page")
'navbar_pagenav_name': "Sections",

# 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 navbar-inverse",

# 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': "nav",

# Bootswatch (http://bootswatch.com/) theme.
#
# Options are nothing (default) or the name of a valid theme
# such as "cosmo" or "sandstone".
#
# The set of valid themes depend on the version of Bootstrap
# that's used (the next config option).
#
# Currently, the supported themes are:
# - Bootstrap 2: https://bootswatch.com/2
# - Bootstrap 3: https://bootswatch.com/3
'bootswatch_theme': "darkly",

# Choose Bootstrap version.
# Values: "3" (default) or "2" (in quotes)
'bootstrap_version': "3",
}


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

# 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_css_files = [
"custom.css",
"https://cdn.jsdelivr.net/npm/[email protected]/dist/darkly/bootstrap.min.css"
#"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css"
]


intersphinx_mapping = {
"talkytrader": ("https://talky.readthedocs.io", None),
"findmyorder": ("https://findmyorder.readthedocs.io", None),
"dxsp": ("https://dxsp.readthedocs.io", None),
"iamlistening": ("https://iamlistening.readthedocs.io", None),
"talkytrend": ("https://talkytrend.readthedocs.io", None),
}

# We recommend adding the following config value.
# Sphinx defaults to automatically resolve *unresolved* labels using all your Intersphinx mappings.
# This behavior has unintended side-effects, namely that documentations local references can
# suddenly resolve to an external location.
# See also:
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_disabled_reftypes
intersphinx_disabled_reftypes = ["*"]


def setup(app):
app.add_css_file("custom.css")
Loading

0 comments on commit e2bd876

Please sign in to comment.