.. Configuration configuration.rst Created: Sun Mar 21 2010 21:21 uur Last modified: Fri Jun 25, 2010 11:45 uur ==================== Configuration ==================== .. index:: sphinx; themes Themes ====== Most of the html themes available in Sphinx are based on the 'basic' theme. This means they also inherit the configuration options that are available for the 'basic' theme. Example: you can configure the 'default' theme with the 'nosidebar' option. The Sphinx documentation for the 'default' theme does not mention this configuration option! .. index:: sphinx; header (logo/image) Image / logo in header ====================== The logo option available in the conf.py file puts a logo in the sidebar. If you disable the sidebar you will loose your logo. In order to show an image in the header of your website you have to modify the layout.html template file. Look at how the Sphinx website itself does it: :: try creating a file layout.html in _templates directory in your project's directory: $ cat _templates/layout.html {% extends "!layout.html" %} {% block header %} Sphinx logo {% endblock %} $ This should do the job, given that you have this line in your conf.py uncommented: templates_path = ['_templates'] Via http://groups.google.com/group/sphinx-dev/browse_thread/thread/37c22abca1304cd8/410b6239f77a6a3f?lnk=gst&q=logo#410b6239f77a6a3f .. index:: sphinx; show source Show rest source ================ You can configure your Sphinx site to show a link to the content rest source on every page. This link is always placed in the sidebar. If you don't want to use the sidebar you have to modify the layout.html template file and insert a placeholder for the show source link at another spot. For example in the page footer. Take a look at this example: file: ``source/_template/layout.html`` .. code-block:: guess {% extends "!layout.html" %} {% block footer %} {# No '{{ super() }}' in this block because I override all default footer content with the following #} {% endblock %} {% block header %} banner {{ super() }} {% endblock %} ----- .. cssclass:: pubdate :Published: Fri Jun 25 2010