| 1 |
============ |
| 2 |
Installation |
| 3 |
============ |
| 4 |
|
| 5 |
Alabaster requires **Sphinx 6.2 or newer**, and is included as the default |
| 6 |
theme. |
| 7 |
|
| 8 |
.. note:: |
| 9 |
If you distribute your documentation via `Read the Docs |
| 10 |
<https://readthedocs.org>`_, you will need to explicitly enable |
| 11 |
Alabaster by adding this line to your ``conf.py``: |
| 12 |
|
| 13 |
.. code-block:: python |
| 14 |
|
| 15 |
html_theme = 'alabaster' |
| 16 |
|
| 17 |
To set-up Alabaster, add an explicit ``html_sidebars`` setting so |
| 18 |
Alabaster's customized sidebar templates are loaded: |
| 19 |
|
| 20 |
.. code-block:: python |
| 21 |
|
| 22 |
html_sidebars = { |
| 23 |
'**': [ |
| 24 |
'about.html', |
| 25 |
'searchfield.html', |
| 26 |
'navigation.html', |
| 27 |
'relations.html', |
| 28 |
'donate.html', |
| 29 |
] |
| 30 |
} |
| 31 |
|
| 32 |
That's it! You now have the standard Alabaster theme set up. Read on for more |
| 33 |
core configuration concerns, or see :doc:`customization` for feature/style |
| 34 |
options. |
| 35 |
|
| 36 |
|
| 37 |
Sidebars |
| 38 |
-------- |
| 39 |
|
| 40 |
Feel free to adjust ``html_sidebars`` as desired - the theme is designed |
| 41 |
assuming you'll always have ``about.html`` activated, but otherwise it doesn't |
| 42 |
care much. |
| 43 |
|
| 44 |
* See `the Sphinx docs |
| 45 |
<https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars>`_ for details on |
| 46 |
how this setting behaves. |
| 47 |
* Alabaster provides ``about.html`` (logo, github button + blurb), |
| 48 |
``donate.html`` (donation/support buttons/links) and ``navigation.html`` (a |
| 49 |
more flexible version of the builtin ``localtoc``/``globaltoc`` templates). |
| 50 |
``searchfield.html`` comes with Sphinx itself. |
| 51 |
|
| 52 |
|
| 53 |
.. _static-path: |
| 54 |
|
| 55 |
Static path for images and/or custom stylesheet |
| 56 |
----------------------------------------------- |
| 57 |
|
| 58 |
If you're using any of the image-related options listed on :doc:`customization` |
| 59 |
(``logo`` or ``touch-icon``) or a :ref:`custom stylesheet <custom-stylesheet>`, |
| 60 |
you'll also want to tell Sphinx where to get these files from. If so, add a |
| 61 |
line like this (changing the path if necessary; see `the Sphinx docs for |
| 62 |
'html_static_path' |
| 63 |
<https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_static_path>`_) to your ``conf.py``: |
| 64 |
|
| 65 |
.. code-block:: python |
| 66 |
|
| 67 |
html_static_path = ['_static'] |