Skip to content

Commit 3c65bcd

Browse files
authored
Merge pull request #246 from TwitchIO/docs-updates
Update docs.
2 parents 7c7a549 + a973d7a commit 3c65bcd

File tree

7 files changed

+68
-188
lines changed

7 files changed

+68
-188
lines changed

docs/_static/css/custom.css

Lines changed: 16 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,35 @@
1-
/* SIGNATURE */
2-
.sig-param {
3-
color: #505050;
4-
font-weight: normal;
1+
.highlight {
2+
background-color: #F6F6F6;
53
}
64

7-
.sig-paren {
8-
color: #505050;
9-
font-weight: bold;
10-
}
11-
12-
.site-nav-tree {
13-
overflow-y: auto;
14-
position: sticky;
15-
align-self: start;
16-
max-height: 75vh;
17-
top: 15vh
18-
}
19-
20-
.site-nav-tree > .caption {
21-
margin-bottom: .5rem;
22-
}
23-
24-
.site-nav-tree > ul {
25-
margin-left: 1rem;
26-
}
27-
28-
.site-nav-tree > p {
29-
margin-bottom: .75rem;
30-
}
31-
32-
div[role=search] {
33-
position: sticky;
34-
top: 6vh;
35-
}
36-
37-
#logo {
38-
width: 19rem;
39-
}
40-
41-
#sidebar-logo {
42-
width: 12rem;
43-
padding-bottom: 2rem;
44-
position: sticky;
45-
top: 2vh;
46-
}
47-
48-
.header {
49-
background-color: #19171C;
50-
}
51-
52-
a {
53-
color: #473fc7;
54-
}
55-
56-
dl:not(.docutils) dt {
57-
background: #eaeaea;
58-
color: #505050;
59-
border-left: 2px #88C2FC solid;
60-
border-top: none;
61-
font-size: 1.5rem;
62-
}
63-
64-
dl:not(.docutils) dt > .property {
65-
font-weight: normal;
66-
font-style: italic;
67-
}
68-
69-
dl:not(.docutils) dt > .sig-prename {
70-
font-weight: normal;
71-
}
72-
73-
74-
dl:not(.docutils) dl dt {
75-
border: none;
76-
color: #5f5f5f;
5+
.class > .sig-object {
6+
border-left: #0e84b5 solid 3px;
7+
border-radius: 0 0 0 3px;
778
}
789

7910
.py-attribute-table {
8011
display: flex;
8112
flex-wrap: wrap;
82-
background: #eaeaea;
83-
padding-left: 1rem;
84-
border-left: 2px #88C2FC solid;
85-
margin-bottom: -0.6rem;
86-
}
87-
88-
.py-attribute-table-column {
89-
flex: .5;
13+
background-color: var(--color-api-background);
14+
margin-bottom: -1rem;
15+
border-radius: 3px 3px 0 0;
16+
border-left: #0e84b5 solid 3px;
9017
}
9118

92-
.py-attribute-table-column > ul {
93-
list-style: none;
19+
.py-attribute-table-entry {
20+
list-style: None;
9421
}
9522

96-
.py-attribute-table-badge {
97-
padding-right: .5rem;
23+
.py-attribute-table-column {
24+
flex: .5;
9825
}
9926

10027
.py-attribute-table-column > span {
10128
font-weight: bold;
29+
margin-left: 1rem;
10230
}
10331

104-
.attr-table-title {
105-
flex: 0 0 100%;
106-
padding-bottom: 1rem;
107-
}
108-
109-
.attr-table-title > .attr-table-title-qualified {
32+
.py-attribute-table-badge {
11033
font-weight: bold;
34+
margin-right: .5rem;
11135
}
112-
/*# sourceMappingURL=custom.css.map */

docs/_static/css/custom.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/_static/logo_dark.png

4.21 KB
Loading

docs/_static/logo_light.png

4.01 KB
Loading

docs/conf.py

Lines changed: 47 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
# add these directories to sys.path here. If the directory is relative to the
1111
# documentation root, use os.path.abspath to make it absolute, like shown here.
1212
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
1319
import os
1420
import sys
1521

@@ -18,15 +24,12 @@
1824
sys.path.append(os.path.abspath("extensions"))
1925

2026
on_rtd = os.environ.get("READTHEDOCS") == "True"
21-
22-
23-
# -- Project information -----------------------------------------------------
24-
2527
project = "TwitchIO"
26-
copyright = "2021, TwitchIO, PythonistaGuild"
27-
author = "TwitchIO, PythonistaGuild"
28-
version = "2.1"
29-
release = "2.1.1"
28+
copyright = "2021, TwitchIO"
29+
author = "TwitchIO"
30+
31+
# The full version, including alpha/beta/rc tags
32+
release = "2.1.3"
3033

3134

3235
# -- General configuration ---------------------------------------------------
@@ -42,6 +45,39 @@
4245
"attributetable",
4346
]
4447

48+
# Add any paths that contain templates here, relative to this directory.
49+
templates_path = ["_templates"]
50+
51+
# List of patterns, relative to source directory, that match files and
52+
# directories to ignore when looking for source files.
53+
# This pattern also affects html_static_path and html_extra_path.
54+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
55+
56+
57+
# -- Options for HTML output -------------------------------------------------
58+
59+
# The theme to use for HTML and HTML Help pages. See the documentation for
60+
# a list of builtin themes.
61+
#
62+
html_theme = "furo"
63+
# html_logo = "logo.png"
64+
65+
html_theme_options = {
66+
"sidebar_hide_name": True,
67+
"light_logo": "logo_light.png",
68+
"dark_logo": "logo_dark.png",
69+
}
70+
71+
# Add any paths that contain custom static files (such as style sheets) here,
72+
# relative to this directory. They are copied after the builtin static files,
73+
# so a file named "default.css" will overwrite the builtin "default.css".
74+
# These folders are copied to the documentation's HTML output
75+
html_static_path = ["_static"]
76+
77+
# These paths are either relative to html_static_path
78+
# or fully qualified paths (eg. https://...)
79+
html_css_files = ["css/custom.css"]
80+
4581
if on_rtd:
4682
extensions.append("sphinxcontrib.napoleon")
4783
else:
@@ -53,14 +89,12 @@
5389
napoleon_include_special_with_doc = False
5490
autodoc_member_order = "groupwise"
5591

56-
# Add any paths that contain templates here, relative to this directory.
57-
templates_path = ["_templates"]
58-
5992
rst_prolog = """
6093
.. |coro| replace:: This function is a |corourl|_.
6194
.. |maybecoro| replace:: This function *could be a* |corourl|_.
6295
.. |corourl| replace:: *coroutine*
6396
.. _corourl: https://docs.python.org/3/library/asyncio-task.html#coroutine
97+
.. |deco| replace:: This function is a **decorator**.
6498
"""
6599

66100
# The suffix(es) of source filenames.
@@ -71,81 +105,5 @@
71105

72106
intersphinx_mapping = {"py": ("https://docs.python.org/3", None)}
73107

74-
75-
# List of patterns, relative to source directory, that match files and
76-
# directories to ignore when looking for source files.
77-
# This pattern also affects html_static_path and html_extra_path.
78-
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
79-
80-
81-
# -- Options for HTML output -------------------------------------------------
82-
83-
# The theme to use for HTML and HTML Help pages. See the documentation for
84-
# a list of builtin themes.
85-
#
86-
html_logo = "logo.png"
87-
# Add any paths that contain custom static files (such as style sheets) here,
88-
# relative to this directory. They are copied after the builtin static files,
89-
# so a file named "default.css" will overwrite the builtin "default.css".
90-
html_theme = "karma_sphinx_theme"
91-
html_static_path = ["./_static"]
92-
html_js_files = []
93-
html_css_files = ["css/custom.css"]
94-
needs_sphinx = "3.4.3"
95-
96-
# The master toctree document.
97-
master_doc = "index"
98-
99-
# The name of the Pygments (syntax highlighting) style to use.
100-
pygments_style = "friendly"
101-
102-
# If true, `_todo` and `todoList` produce output, else they produce nothing.
103-
todo_include_todos = False
104-
105-
# -- Options for HTML output ----------------------------------------------
106-
107-
# The theme to use for HTML and HTML Help pages. See the documentation for
108-
# a list of builtin themes.
109-
html_theme_options = {"navigation_depth": 4}
110-
111-
# Theme options are theme-specific and customize the look and feel of a theme
112-
# further. For a list of options available for each theme, see the
113-
# documentation.
114-
#
115-
# html_theme_options = {}
116-
117-
# Custom sidebar templates, must be a dictionary that maps document names
118-
# to template names.
119-
html_sidebars = {
120-
"**": [
121-
"globaltoc.html",
122-
"searchbox.html",
123-
]
124-
}
125-
126-
127-
# -- Options for HTMLHelp output ------------------------------------------
128-
129-
# Output file base name for HTML help builder.
130-
htmlhelp_basename = "TwitchIOdoc"
131-
132-
# -- Options for Texinfo output -------------------------------------------
133-
134-
# Grouping the document tree into Texinfo files. List of tuples
135-
# (source start file, target name, title, author,
136-
# dir menu entry, description, category)
137-
texinfo_documents = [
138-
(
139-
master_doc,
140-
"TwitchIO",
141-
"TwitchIO Documentation",
142-
author,
143-
"TwitchIO",
144-
"A Python IRC and API wrapper for Twitch.",
145-
"Miscellaneous",
146-
),
147-
]
148-
149-
150-
def setup(app):
151-
app.add_css_file("/style.css")
108+
pygments_style = "sphinx"
109+
pygments_dark_style = "monokai"

docs/exts/eventsub.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ integrating seamlessly into the twitchio Client event dispatching system.
1919

2020

2121
A Quick Example
22-
================
22+
----------------
2323

2424
.. code-block:: python3
2525
@@ -40,7 +40,7 @@ A Quick Example
4040
bot.loop.run_forever()
4141
4242
Event Reference
43-
================
43+
----------------
4444
This is a list of events dispatched by the eventsub ext.
4545

4646
.. function:: event_eventsub_revokation(event: RevokationEvent)
@@ -72,7 +72,7 @@ This is a list of events dispatched by the eventsub ext.
7272

7373

7474
API Reference
75-
================
75+
--------------
7676

7777
.. attributetable:: EventSubClient
7878

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
sphinx==3.4.3
1+
sphinx
22
docutils<0.18
33
sphinxcontrib-napoleon
44
sphinxcontrib-asyncio
55
sphinxcontrib-websupport
66
Pygments
7-
karma_sphinx_theme
7+
furo

0 commit comments

Comments
 (0)