Skip to content

Customizing the theme

Felipe Fonseca edited this page Mar 22, 2018 · 4 revisions

Version 0.1

This page describes how we customized the look n' feel of our instance of Read the Docs to integrate with the other Subutai websites.

The project uses the bootstrap-based basicstrap theme as base. See documentation of basicstrap here . This theme uses jinja 2 as a template engine.

Theme files are located at _theme folder. Inside _theme folder, we have the _static folder that contains the static files like css files, js and images. To call a resource from _theme/_static you must to use {{ pathto('_static/pathtoyourfile/file.extension', 1) }}" (you will need to make explict the number 1 or 0 as a parameter to enable or disable this resource) inside href or src attribute.

To enable your custom css as main css to theme you need to change theme.conf and set your css in stylesheet variable.

You can set some layout details inside config.py e.g:

html_theme_options = { 'header_inverse': True, 'relbar_inverse': True, }

The above command changes the header color to the inverse color (Boostrap navbar-inverse). See html_theme_options reference.

Project name, Copyright and Author are manipulated by config.py. To use the full width of the page you must use {{class_row}} inside the class attribute.

After you make any change, you need to run make html or sh build.sh to see your new changes.

Clone this wiki locally