Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tensorly/tensorly-sphinx-theme

Sphinx Theme for the TensorLy Project.
https://github.com/tensorly/tensorly-sphinx-theme

bulma html-theme sphinx tensorly

Last synced: 8 days ago
JSON representation

Sphinx Theme for the TensorLy Project.

Awesome Lists containing this project

README

        

=====================
TensorLy Sphinx Theme
=====================

This is the `TensorLy `_ theme for `Sphinx `_ documentations,
based on `Bulma `_.

Installation
============

After cloning this repository, simply run:

.. code:: bash

pip install -e .

Usage
=====

To use the theme in your project, add the following to the `conf.py` file of your sphinx documentation:

.. code:: python

html_theme = "tensorly_sphinx_theme"

Configuration
=============

Project logo
------------
The logo of your project will be used in the navigation bar. You can specify the path to it in your `conf.py`:

.. code:: rst

html_logo = '_static/image.png'

Navigation and main options
---------------------------

You can set most of the parameters in your sphinx configuration file (`conf.py`).

The options are:

* `'google_analytics'` : str, your Google analytics ID, if any.
* `'nav_links'` : tuple list, a list of ('Link display name', 'local.file'), contains the links to the local documentation, in the top navigation bar. If the link starts with 'http', it will be considered as an external link.
* `'nav_dropdowns'` : same as above but contains multiple links in a dropdown.

**Example:**

.. code:: rst

html_theme_options = {
'google_analytics' : 'YOUR_GOOGLE_ANALYTICS_ID',
'nav_links' : [('Install', 'installation'),
('User Guide', 'user_guide/index'),
('TensorLy', 'https://github.com/tensorly/tensorly'),
('TensorLy-Torch', 'https://github.com/tensorly/torch')],
'nav_dropdowns': [('LinksInDropdown', [('TensorLy', 'http://tensorly.org/dev'),
('TensorLy-Viz', 'http://tensorly.org/viz'),
('TensorLy-Quantum', 'http://tensorly.org/quantum')]
)],
}

In rst files
------------

In your documentation itself, you can use ``:no-toc:``, ``:no-localtoc:`` and ``:no-pagination:``
to remove the side-menu's table of content (toc), local toc ("on this page")
and pagination buttons, respectively.
For instance, if you don't want ``file.rst`` to have a toc, simply add in the file:

.. code::

:no-toc: