Sphinx theme used by Maisie.
Project description
Sphinx theme used by Maisie: https://docs.maisie.dev
Based on the Guzzle theme: http://guzzlephp.org
Installation
Install via pip:
$ pip install Maisie-Sphinx-Theme
or if you have the code checked out locally:
$ python setup.py install
Configuration
Add the following to your conf.py:
import maisie_sphinx_theme
html_theme_path = maisie_sphinx_theme.html_theme_path()
html_theme = 'maisie_sphinx_theme'
# Register the theme as an extension to generate a sitemap.xml
extensions.append("maisie_sphinx_theme")
# Maisie theme options (see theme.conf for more information)
html_theme_options = {
# Set the name of the project to appear in the sidebar
"project_nav_name": "Project Name",
}
There are a lot more ways to customize this theme, as this more comprehensive example shows:
import maisie_sphinx_theme
html_theme_path = maisie_sphinx_theme.html_theme_path()
html_theme = 'maisie_sphinx_theme'
# Register the theme as an extension to generate a sitemap.xml
extensions.append("maisie_sphinx_theme")
# Maisie theme options (see theme.conf for more information)
html_theme_options = {
# Set the path to a special layout to include for the homepage
"index_template": "special_index.html",
# Set the name of the project to appear in the left sidebar.
"project_nav_name": "Project Name",
# Set your Disqus short name to enable comments
"disqus_comments_shortname": "my_disqus_comments_short_name",
# Set you GA account ID to enable tracking
"google_analytics_account": "my_ga_account",
# Path to a touch icon
"touch_icon": "",
# Specify a base_url used to generate sitemap.xml links. If not
# specified, then no sitemap will be built.
"base_url": "",
# Allow a separate homepage from the master_doc
"homepage": "index",
# Allow the project link to be overriden to a custom URL.
"projectlink": "http://myproject.url",
# Visible levels of the global TOC; -1 means unlimited
"globaltoc_depth": 3,
# If False, expand all TOC entries
"globaltoc_collapse": False,
# If True, show hidden TOC entries
"globaltoc_includehidden": False,
}
Customizing the layout
You can customize the theme by overriding Jinja template blocks. For example, “layout.html” contains several blocks that can be overridden or extended.
Place a “layout.html” file in your project’s “/_templates” directory.
mkdir source/_templates
touch source/_templates/layout.html
Then, configure your “conf.py”:
templates_path = ['_templates']
Finally, edit your override file “source/_templates/layout.html”:
{# Import the theme's layout. #} {% extends "!layout.html" %} {%- block extrahead %} {# Add custom things to the head HTML tag #} {# Call the parent block #} {{ super() }} {%- endblock %}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for Maisie-Sphinx-Theme-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc69b32468a00d99ad1f7342757230ad03c1b526d212aeccb127fd9a29c5aa4e |
|
MD5 | 426d11503a7fef5f380fa8908a1b24ed |
|
BLAKE2b-256 | e5334aba3d2b5cd4bf89430ae052c9a75212cbb113d22fc5716529ce50106aff |
Close
Hashes for Maisie_Sphinx_Theme-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1892e4ed9177e20072d72da6dc3ea34de2d78e47d2fe9823387a784adf9234ff |
|
MD5 | deb4def3b26d7b508a4695f167b90f59 |
|
BLAKE2b-256 | ef844fc272be0960a22906bfe03ed8458319f268da122ca4141d4e73d2e0cf0b |