Base templates for ESnet's GitHub pages. These pages are created using the sphinx-bootstrap-theme with some pages. This repo is meant to be included into a project using git subtree and provides the overrides and customizations to the base theme.
cd $PROJECT_ROOTmkdir docsgit subtree add --prefix docs/_esnet https://github.com/esnet/esnet-gh-pages-base.git master --squashcd docssphinx-quickstartln -s ../_esnet/static _static/esnetconf.py as described in the next sectionsphinx-quickstart creates a basic conf.py file, however to use the ESnet
theme we need to make some changes. Make the following changes to conf.py:
# add this with the imports at the top of the file
import sphinx_bootstrap_theme
# change templates_path to this
templates_path = ['_esnet/templates']
# add _esnet to exclude_patterns
exclude_patterns = ['_build', '_esnet']
# change html_theme and html_theme_path:
html_theme = 'bootstrap'
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# add html_theme options:
html_theme_options = {
"navbar_pagenav": False,
"nosidebar": False,
"navbar_class": "navbar",
"navbar_site_name": "Section",
"source_link_position": "footer",
"navbar_links": [
("Index", "genindex"),
("ESnet", "https://www.es.net", True),
],
}
# add html_logo and html_sidebars
html_logo = "_esnet/static/logo-esnet-ball-sm.png"
html_sidebars = {'index': None, 'search': None, '*': ['localtoc.html']}
html_favicon = "_esnet/static/favicon.ico"
html_context = {
"github_url": "https://github.com/esnet/PROJNAME",
}
That's it!
The files are in the docs directory. Take a look at the content of
index.rst. Take a look at the docs from other projects and review the
documentation for Building HTML
In the docs directory run make clean html.
open _build/html/index.html
or
open -a /Application/Google\ Chrome.app _build/html/index.html
From the docs directory run _esnet/deploy.sh. It will be visible at:
http://github.com/esnet/PROJECT.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。