0

I have some API Documentation which I'm mostly happy with.

I'm using the sphinx_bootstrap_theme to render my doc style. However, I want to modify how each API method renders.

Today the docs look like this: ccp_jumbled

I want to make a small change to the bootstrap theme, such that I get an HR between every method like this: ccp_segmented

QUESTION:
Where do I modify sphinx_bootstrap_theme such that I can customize the rendering of these methods?

I looked through the sphinx_bootstrap_theme templates, but I can't seem to find the template I have to monkey with to make this work right.

If you want to see how I've configured my docs, you can find the source tree here

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174

1 Answers1

1

Usually, it is a bit tricky to tweak the original code. What I personally do and so far was happy with is the overwrite the existing style by adding a custom css to implement some minor changes. The way I do it:

  • Create a folder called css under source/_static
  • Add a new css (for example: custom.css) file that includes your desired changes.
  • Add the following code to your conf.py
def setup(app):
    app.add_stylesheet('css/custom.css')
  • Save and build

For more check this

Mike Pennington
  • 41,899
  • 19
  • 136
  • 174
SuperKogito
  • 2,998
  • 3
  • 16
  • 37