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 0f8b0be commit b9709ad
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 15 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;
}
3 changes: 0 additions & 3 deletions docs/source/_static/css/my.css

This file was deleted.

37 changes: 28 additions & 9 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 All @@ -93,7 +113,6 @@
}

html_css_files = [
"css/my.css",
"css/custom.css",
"css/all.min.css",
]
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

0 comments on commit b9709ad

Please sign in to comment.