Templating and Themes Support ============================= .. post:: Oct 26, 2024 :tags: themes :category: Manual :author: Libor Ablog, being a Sphinx extension, has highly customizable HTML output. The generated HTML files are based on `Sphinx templates`_. You, or Sphinx themes, can partially or completely override these templates to customize the resulting HTML. .. _Sphinx templates: https://www.sphinx-doc.org/en/master/development/html_themes/templating.html .. versionchanged:: 0.11 The :doc:`Ablog 0.11 ` has changed and improved the way you can customize templates and themes. Please note that this document describes the new way of customizing templates and themes support. .. _sidebars: Blog sidebars ------------- Sidebars are a common way to provide additional information to the reader. There are seven Ablog sidebars you can include in your HTML output using the Sphinx_ :confval:`html_sidebars` configuration option (in addition to your theme sidebars). - ``ablog/postcard.html`` provides information regarding the current post (when on a post page). - ``ablog/recentposts.html`` lists the most recent five posts. - ``ablog/tagcloud.html`` provides links to archive pages generated for each tag. - ``ablog/category.html``, ``ablog/authors.html``, ``ablog/languages.html``, and ``ablog/locations.html`` sidebars generate lists of links to respective archive pages with the number of matching posts (e.g., "Manual (14)", "2023 (8)", "English (22)"). For example, the sidebars that you see on this website on the left are: .. code-block:: python html_sidebars = { "**": [ # Comes from Alabaster theme "about.html", "searchfield.html", # Ablog sidebars "ablog/postcard.html", "ablog/recentposts.html", "ablog/tagcloud.html", "ablog/categories.html", "ablog/archives.html", "ablog/authors.html", "ablog/languages.html", "ablog/locations.html", ] } Styling default Ablog sidebars ------------------------------ Ablog standard sidebars are wrapped in ``