Skip to content

Commit

Permalink
增加搜索弹框和右侧目录滑动
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengshanshan committed May 29, 2024
1 parent 1548ec1 commit 4f35cd3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ help:

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile $(SOURCEDIR)/_templates/versions.html $(SOURCEDIR)/_static/topbar.css $(SOURCEDIR)/_static/custom.css $(SOURCEDIR)/_static/init_mermaid.js
%: Makefile $(SOURCEDIR)/_templates/versionsFlex.html $(SOURCEDIR)/_static/topbar.css $(SOURCEDIR)/_static/custom-theme.css $(SOURCEDIR)/_static/init_mermaid.js
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

mhtml: Makefile $(SOURCEDIR)/_templates/versions.html $(SOURCEDIR)/_static/topbar.css $(SOURCEDIR)/_static/custom.css $(SOURCEDIR)/_static/init_mermaid.js
mhtml: Makefile $(SOURCEDIR)/_templates/versionsFlex.html $(SOURCEDIR)/_static/topbar.css $(SOURCEDIR)/_static/custom-theme.css $(SOURCEDIR)/_static/init_mermaid.js
@$(SPHINXMULTIVERSION) "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

_templates:
mkdir -p $(SOURCEDIR)/_templates

$(SOURCEDIR)/_templates/versions.html:
$(SOURCEDIR)/_templates/versionsFlex.html:
wget $(WEB_DOCS_BUILDER_URL)/_templates/$(@F) -O $@

$(SOURCEDIR)/_static/topbar.css:
wget $(WEB_DOCS_BUILDER_URL)/_static/$(@F) -O $@

$(SOURCEDIR)/_static/custom.css:
$(SOURCEDIR)/_static/custom-theme.css:
wget $(WEB_DOCS_BUILDER_URL)/_static/$(@F) -O $@

$(SOURCEDIR)/_static/init_mermaid.js:
Expand Down
10 changes: 6 additions & 4 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,19 @@
# html_theme = 'alabaster'
html_theme = "sphinx_book_theme"
html_static_path = ['_static']
html_sidebars = {
'**':['navbar-logo.html','search-field.html','sbt-sidebar-nav.html', 'versions.html'],
}
html_copy_source = True
html_show_sourcelink = False

# if want to add top nav for canann, enable this.
# html_css_files = ['topbar.css']
html_css_files = ['topbar.css', 'custom.css']
html_css_files = ['topbar.css', 'custom-theme.css']

html_theme_options = {
"repository_url": "https://github.com/kendryte/canmv_docs",
'collapse_navigation': True,
'navigation_depth': 7,
"use_edit_page_button": True,
"use_edit_page_button": True,
"show_navbar_depth": 2,
"primary_sidebar_end": ["versionsFlex.html"],
}

0 comments on commit 4f35cd3

Please sign in to comment.