Usage

This project is meant to be used with a Sphinx project, as it is a UI theme for it.

There are two ways to apply the theme, which are nearly the same. It can be installed in the local repository and then be used as a dependency, or the project code (the ‘sphinx_docs_theme’ folder) can be copied to the Sphinx project themes folder.

Setting up the theme

Using it as a dependency

If the project has been installed in the local libraries repository, it can be used just by adding the following lines to the conf.py file of any Sphinx project:

import sphinx_docs_theme

html_theme = 'sphinx_docs_theme'
html_theme_path = sphinx_docs_theme.get_html_theme_path()

Using it from the Sphinx themes folder

Another possibility is just adding the project code, contained int the ‘sphinx_docs_theme’ folder, to the themes folder of your Sphinx project, which is:

docs\_themes\

And then it is just needed to add the following files to the conf.py file:

html_theme = 'sphinx_docs_theme'
html_theme_path = ["_themes", ]

Theme variables

After setting up the theme the theme variables should be configured. To find more about them check the configuration section.

Pieces of code, which are automatically highlighted with the help of highlight.js:

/**
* The HelloWorldApp class implements an application that
* simply prints "Hello World!" to standard output.
*/
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

Long code section

class LongPrint {
    public static void main(String[] args) {
        System.out.println("This is a very loooooooooooooooooooooong string, to show how a very loooooooooooooooooong piece of code is show. A sliding bar should be visible in the lower part of the code section, and it should be usable.");
    }
}