1

I'm new to Sphinx docs generator and I want to add a background image to the website. How can I handle that ? I tried to put the bg image to the static folder and tried adding it to the css but it still doesn't appear.

DuyguKeskek
  • 333
  • 3
  • 17
  • How are you adding the image? Does it appear in your build folder? Are you sure that path in CSS is correct? – errata May 24 '17 at 22:34
  • @errata Hi, I could manage adding it in CSS, but I want to actually add it as a static image. I'm using JinJa2 templating engine and I'm not sure if adding the static images directly to CSS is a correct way. I try to find a way to add it as a static img. – DuyguKeskek May 24 '17 at 22:47
  • Possible duplicate of https://stackoverflow.com/questions/14622698/customize-sphinxdoc-theme – Steve Piercy May 25 '17 at 00:55

1 Answers1

1

If you want to add image you can use image directive, for example:

.. image:: _static/path/to/your/image.png
   :scale: 10 %
   :align: left
   :class: intro-logo

Since you can add class to it, you can modify your style directly in CSS.

Also, be sure that you defined your static folder in conf.py:

html_static_path = ['_static']
errata
  • 5,695
  • 10
  • 54
  • 99