All Projects → bashtage → Sphinx Material

bashtage / Sphinx Material

Licence: other
A material-based, responsive theme inspired by mkdocs-material

Projects that are alternatives of or similar to Sphinx Material

Polybar Spotify
🎵 Spotify status and controls module for Polybar with text scrolling
Stars: ✭ 162 (-2.41%)
Mutual labels:  hacktoberfest
Dot Hammerspoon
My personal Hammerspoon configuration - mirrored from GitLab
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
Webhooks.js
GitHub webhook events toolset for Node.js
Stars: ✭ 166 (+0%)
Mutual labels:  hacktoberfest
Jenkins Zh
Jenkins 中文社区网站源码
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
Pygem
Python Geometrical Morphing
Stars: ✭ 164 (-1.2%)
Mutual labels:  hacktoberfest
Sylius Standard
Open Source eCommerce Application on top of Symfony
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
Supervisor
PHP library for managing Supervisor through XML-RPC API
Stars: ✭ 163 (-1.81%)
Mutual labels:  hacktoberfest
Filbert Js
A lightweight(~1kb) css-in-js framework
Stars: ✭ 167 (+0.6%)
Mutual labels:  hacktoberfest
Jenkins.io
A static site for the Jenkins automation server
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
Tari
The Tari protocol
Stars: ✭ 164 (-1.2%)
Mutual labels:  hacktoberfest
Granite
Library that extends GTK with common widgets and utilities
Stars: ✭ 164 (-1.2%)
Mutual labels:  hacktoberfest
Knoxite
A data storage & backup system
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
Cucumber Eclipse
Eclipse plugin for Cucumber
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
React Image Annotate
Create image annotations. Classify, tag images with polygons, bounding boxes or points.
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
Boa
Boa is an embeddable and experimental Javascript engine written in Rust. Currently, it has support for some of the language.
Stars: ✭ 2,509 (+1411.45%)
Mutual labels:  hacktoberfest
Consumerfinance.gov
Django project protecting American consumers
Stars: ✭ 164 (-1.2%)
Mutual labels:  hacktoberfest
Micropad Core
µPad (MicroPad) is an open digital note taking app
Stars: ✭ 165 (-0.6%)
Mutual labels:  hacktoberfest
Javascript20 Projects
Student submissions for the JavaScript 20 projects
Stars: ✭ 166 (+0%)
Mutual labels:  hacktoberfest
Hypothesistests.jl
Hypothesis tests for Julia
Stars: ✭ 166 (+0%)
Mutual labels:  hacktoberfest
Theme Ui Sketchy
Sketchy Theme UI Preset
Stars: ✭ 166 (+0%)
Mutual labels:  hacktoberfest

Material Sphinx Theme

Continuous Integration

|Travis Build Status|

Release

|PyPI Status|

License

|MIT License|

A Material Design theme for Sphinx documentation. Based on Material for MkDocs <https://squidfunk.github.io/mkdocs-material/>, and Guzzle Sphinx Theme <https://github.com/guzzle/guzzle_sphinx_theme>.

See the theme's demonstration site <https://bashtage.github.io/sphinx-material/>_ for examples of rendered rst.

Installation

Install via pip:

.. code-block:: bash

$ pip install sphinx-material

or if you have the code checked out locally:

.. code-block:: bash

$ python setup.py install

Configuration

Add the following to your conf.py:

.. code-block:: python

html_theme = 'sphinx_material'

There are a lot more ways to customize this theme, as this more comprehensive example shows:

.. code-block:: python

# Required theme setup
html_theme = 'sphinx_material'

# Set link name generated in the top bar.
html_title = 'Project Title'

# Material theme options (see theme.conf for more information)
html_theme_options = {

    # Set the name of the project to appear in the navigation.
    'nav_title': 'Project Name',

    # Set you GA account ID to enable tracking
    'google_analytics_account': 'UA-XXXXX',

    # Specify a base_url used to generate sitemap.xml. If not
    # specified, then no sitemap will be built.
    'base_url': 'https://project.github.io/project',

    # Set the color and the accent color
    'color_primary': 'blue',
    'color_accent': 'light-blue',

    # Set the repo location to get a badge with stats
    'repo_url': 'https://github.com/project/project/',
    'repo_name': 'Project',

    # 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.

.. code-block:: bash

mkdir source/_templates
touch source/_templates/layout.html

Then, configure your 'conf.py':

.. code-block:: python

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 %}

.. |Travis Build Status| image:: https://travis-ci.com/bashtage/sphinx-material.svg?branch=master :target: https://travis-ci.com/bashtage/sphinx-material

.. |PyPI Status| image:: https://badge.fury.io/py/sphinx-material.svg :target: https://badge.fury.io/py/sphinx-material

.. |MIT License| image:: https://img.shields.io/badge/License-MIT-blue.svg :target: https://opensource.org/licenses/MIT-Clause

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].