一个美丽、简约且响应式的Sphinx项目主题。
项目描述
摘要
Amunra为基于Bootstrap 4的Sphinx提供了一个轻量级、易于使用且响应式的主题。它具有一个可以手动配置或使用Sphinx的标准toctree指令配置的简约顶部导航栏。
演示
在这里查看主题的实际应用
安装
安装主题
pip install amunra-sphinx-theme
在您的Sphinx的conf.py配置文件中按如下方式配置它
html_theme = "amunra_sphinx_theme"
通过在您的conf.py文件中添加以下代码片段来配置主题选项
html_theme_options = { # Title shown in the top left. (Default: ``project`` value.) "navbar_title": "Amunra", # Links to shown in the top bar. (Default: top-level ``toctree`` entries.) "navbar_links": [ ("Quickstart", "quickstart"), ("Tutorials", "tutorials/index"), ("API", "api/index"), ("About", "about/index"), ], # If ``github_link`` is set, a GitHub icon will be shown in the top right. "github_link": "https://github.com/barentsen/amunra-sphinx-theme", # Text to show in the footer of every page. "footer_text": "Created with ♥ by Geert Barentsen.", # Google Analytics ID. (Optional.) "analytics_id": "UA-XXXXX-X" }
可选:通过在您的index.rst文件中包含以下代码为您的项目创建一个漂亮的启动页面
.. title:: Your-Project-Title .. container:: lead Your-Project-Title A short description of your project. .. raw:: html <a href="quickstart.html" class="btn btn-primary">Quickstart →</a>