Skip to content

Commit d1098de

Browse files
update sphinx theme (#855) (#856)
* clean up Sphinx UI by removing header and sidebar * add param description & hide footer Co-authored-by: amitnGiniApps <155542316+amitnGiniApps@users.noreply.github.com>
1 parent 4556365 commit d1098de

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.bd-sidebar {
2+
display: none;
3+
}
4+
5+
.header-article {
6+
height: 0;
7+
background-color: transparent;
8+
}
9+
10+
.footer-content {
11+
display: none;
12+
}

cli/marketplace/build.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def build_marketplace(
151151
sphinx_quickstart(temp_docs, requirements)
152152

153153
build_temp_project(source_dir, temp_root)
154-
build_temp_docs(temp_root, temp_docs)
154+
build_temp_docs(temp_root, temp_docs, source_dir)
155155
patch_temp_docs(source_dir, temp_docs)
156156

157157
if _verbose:
@@ -668,7 +668,7 @@ def sphinx_quickstart(
668668
click.echo("[Sphinx] Done quickstart")
669669

670670

671-
def build_temp_docs(temp_root, temp_docs):
671+
def build_temp_docs(temp_root, temp_docs, source_dir):
672672
"""
673673
Look recursively in <MODULE_PATH> for Python modules and packages and create
674674
one reST file with automodule directives per package in the <OUTPUT_PATH>. The
@@ -678,6 +678,7 @@ def build_temp_docs(temp_root, temp_docs):
678678
679679
:param temp_root: The project's temporary functions root.
680680
:param temp_docs: The project's temporary docs root.
681+
:param source_dir: Path to the source directory to build the marketplace from
681682
"""
682683
click.echo("[Sphinx] Running autodoc...")
683684

@@ -686,6 +687,7 @@ def build_temp_docs(temp_root, temp_docs):
686687

687688
sphinx_apidoc_cmd(cmd.split(" "))
688689

690+
shutil.copytree(source_dir / "cli" / "marketplace" / "_static" / "css", temp_docs / '_static/css')
689691
click.echo("[Sphinx] Done autodoc")
690692

691693

cli/marketplace/conf.template

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,22 @@ html_theme = "sphinx_book_theme"
8484
# relative to this directory. They are copied after the builtin static files,
8585
# so a file named "default.css" will overwrite the builtin "default.css".
8686
html_static_path = ["_static"]
87+
html_css_files = ["css/custom.css"]
8788

8889
html_theme_options = {
8990
"repository_url": "{{repository_url}}",
9091
"use_repository_button": True,
9192
"use_issues_button": True,
9293
"use_edit_page_button": True,
94+
"use_repository_button": False,
95+
"use_issues_button": False,
96+
"use_edit_page_button": False,
9397
"path_to_docs": "docs",
9498
"repository_branch": "{{repository_branch}}",
9599
"single_page": True,
96100
"navigation_with_keys": False,
101+
"use_download_button": False,
102+
"use_fullscreen_button": False,
97103
}
98104

99105
html_title = "{{html_title}}"

0 commit comments

Comments
 (0)