Skip to content

Commit

Permalink
Pyrofork: Change docs theme to sphinx-immaterial
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <wulan17@nusantararom.org>
  • Loading branch information
wulan17 committed Dec 8, 2023
1 parent 7253f22 commit 902a687
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 14 deletions.
16 changes: 15 additions & 1 deletion docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
@import url("https://docs.pyrogram.org/_static/css/custom.css");
body{
--color-green: darkgreen;
--color-red: darkred;
}

.usable-by {
border: 1px ;
border-radius: .2em;
padding: 2px 5px;
background-color: #1a1c1e;
}

a {
text-decoration: none;
}
4 changes: 1 addition & 3 deletions docs/source/_static/css/my.css
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
.pre{
color: #bfbfbf;
}

36 changes: 28 additions & 8 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx_copybutton",
"sphinx_rtd_dark_mode"
"sphinx_immaterial"
]

intersphinx_mapping = {
Expand All @@ -64,17 +64,37 @@
suppress_warnings = ["image.not_readable"]

html_title = "Pyrofork Documentation"
html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_immaterial"
html_static_path = ["../resources/static","_static"]
html_show_sourcelink = True
html_show_copyright = False
html_theme_options = {
"canonical_url": "https://pyrofork.mayuri.my.id/",
"collapse_navigation": True,
"sticky_navigation": False,
"logo_only": True,
"display_version": False,
"style_external_links": True
"icon": {
"repo": "fontawesome/brands/github",
"edit": "material/file-edit-outline",
},
"site_url": "https://pyrofork.mayuri.my.id/",
"repo_url": "https://github.com/Mayuri-Chan/pyrofork/",
"repo_name": "pyrofork",
"globaltoc_collapse": True,
"features": [
"navigation.expand",
"navigation.tabs",
"navigation.sections",
"navigation.top",
"search.share",
"toc.follow",
"toc.sticky",
"content.tabs.link",
"announce.dismiss",
],
"palette": [
{
"media": "(prefers-color-scheme: dark)",
"scheme": "slate"
}
],
"toc_title_is_page_title": True
}

html_logo = "../resources/static/img/pyrogram.png"
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ dev = [

docs = [
"sphinx",
"sphinx_rtd_theme==2.0.0",
"sphinx-rtd-dark-mode",
"sphinx-immaterial==0.11.9",
"sphinx_copybutton",
"sphinx-autobuild",
"tornado>=6.3.3"
Expand Down
Binary file added sphinx_immaterial-0.11.9-py3-none-any.whl
Binary file not shown.
Binary file added sphinx_immaterial-0.11.9-py3-none-any.whl.aria2
Binary file not shown.

0 comments on commit 902a687

Please sign in to comment.