Giter Club home page Giter Club logo

docs's Introduction

Borg StorageSphinx Theme

This Sphinx theme is a fork of the original Read the Docs theme that was designed to provide a great reader experience for documentation users on both desktop and mobile devices. You can find a working demo of the theme in the Borg Storagedocumentation.

image

Installation

This theme can be installed with pip:

$ pip install https://github.com/revitron/revitron-sphinx-theme/archive/master.zip

To use the theme in your Sphinx project, you will need to add the following to your conf.py file:

import revitron_sphinx_theme

extensions = [
    ...
    "revitron_sphinx_theme",
]

html_theme = "revitron_sphinx_theme"

Configuration

This theme is highly customizable on both the page level and on a global level.

html_theme_options = {
    'color_scheme': '',
    'canonical_url': '',
    'analytics_id': 'UA-XXXXXXX-1', 
    'style_external_links': False,
    'collapse_navigation': True,
    'sticky_navigation': True,
    'navigation_depth': 4,
    'includehidden': True,
    'titles_only': False,
    'github_url': '',
    'logo_mobile': 'demo/static/logo-mobile.svg
}

html_logo = 'demo/static/logo.svg'

Dark Mode

image

To activate the dark color scheme, you can simply add the following option to the html_theme_options:

html_theme_options = {
    'color_scheme': 'dark'
}

Custom Color Schemes

Colors in this theme are controlled by CSS custom properties. Therefore it is quite easy to override either the light or the dark color scheme by defining custom colors for those properties in an additional CSS file that is added using the conf.py of your docs. A full list of available properties can be found in here.

Adding a Landing Page

It is possible to render the master_doc page with a landing page template. That template provides some special classes to style content and add buttons. It can be enabled and configured in the conf.py as follows.

html_context = {
    'landing_page': {
        'menu': [
            {'title': 'Get Started', 'url': 'installing.html'},
            {'title': 'GitHub', 'url': 'https://github.com/user/repo'}
        ]
    } 
}

image

image

Container Classes

This theme provides three container classes to style paragraphs, wrap images and create buttons directly in a .rst file.

.. container:: .large

   A large text block ...

.. container:: .buttons

   `Docs <installing.html>`_
   `GitHub <installing.html>`_

.. container:: .image

   .. image:: image.png

image

Contributing

If you would like to help modify or translate the theme, you'll find more information on contributing in the contributing guide of the original theme.

image

docs's People

Contributors

agjohnson avatar benjaoming avatar blendify avatar carreau avatar chebee7i avatar cloudops-wstevens avatar csatarigergely avatar danieloaks avatar davidfischer avatar dependabot-preview[bot] avatar dojutsu-user avatar ederag avatar ehough avatar ericholscher avatar gl3n avatar ivoz avatar jessetan avatar jonathanj avatar jorgesumle avatar macagua avatar marcantondahmen avatar mitya57 avatar mondeja avatar rdil avatar sambacha avatar segevfiner avatar snide avatar stsewd avatar titilambert avatar tony avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.