Metadata-Version: 2.5
Name: mekki
Version: 0.1.0
Summary: A simple, lightweight Sphinx HTML theme.
Project-URL: Homepage, https://github.com/wakinotani/mekki
Project-URL: Issues, https://github.com/wakinotani/mekki/issues
Author-email: Yoshiyuki Wakinotani <wakinotani@gmail.com>
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Sphinx
Classifier: Framework :: Sphinx :: Theme
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Software Development :: Documentation
Requires-Python: >=3.11
Requires-Dist: sphinx>=8
Description-Content-Type: text/x-rst

========================================================================
mekki
========================================================================

A simple, lightweight `Sphinx <https://www.sphinx-doc.org>`_ HTML theme.

It works well together with `sphinx-mekki <https://github.com/wakinotani/sphinx-mekki>`_, a Sphinx extension to embed images, download files, CSSs, and JSs into a single HTML file.

Installation
========================================================================

You are able to install ``mekki`` with ``pip``.

.. code-block:: shell

   pip install mekki

Usage
========================================================================

Set ``html_theme`` to ``mekki`` in your ``conf.py``. No entry in ``extensions`` is needed.

.. code-block:: python

   html_theme = "mekki"

Layout
========================================================================

``mekki`` is built on Sphinx's ``basic`` theme and keeps its templates, so
pages get basic's search, index and accessibility markup.

- The sidebar is on the left, takes the full height of the window and
  scrolls separately from the body. It holds the logo and project title,
  the global table of contents, the previous/next links, "Show Source" and
  the search box. It is hidden on screens narrower than 900px and when
  printing.
- The body takes the rest of the width, and the footer is placed at the
  bottom of the body column.
- By default there are no related (navigation) bars at the top and bottom
  of the page. With the ``relbar`` option they are shown above and below the
  body, inside the body column, and the previous/next links are removed from
  the sidebar.

Theme options
========================================================================

Besides the options inherited from the ``basic`` theme, ``mekki`` sets these
defaults:

.. code-block:: python

   html_theme_options = {
       "nosidebar": "false",      # hide the sidebar if "true"
       "sidebarwidth": "240",     # sidebar width in pixels
       "body_max_width": "none",  # maximum body width ("none": no limit)
       "relbar": "false",         # show the related bars if "true"
       "show_project": "false",   # show the project name in the footer if "true"
       "show_version": "false",   # show the version in the footer if "true"
       "logo_link": "root",       # where the logo and the title link to
       "show_sidebar_title": "true",  # hide the title under the logo if "false"
   }

The sidebar contents can be changed with ``html_sidebars`` in ``conf.py``.
When ``relbar`` is ``"true"``, ``relations.html`` is removed from the sidebar
contents, including one given in ``html_sidebars``. When it is ``"false"``,
the sidebar contents are used as they are.

``show_project`` and ``show_version`` add the project name and the version
(``project`` and ``version`` in ``conf.py``) at the start of the footer, as
"project version", "project" or "version". An empty ``version`` is not
shown. The rest of the footer is controlled by Sphinx's
``html_show_copyright``, ``html_last_updated_fmt`` and ``html_show_sphinx``.

``logo_link`` says where the logo and the project title at the top of the
sidebar link to: ``"root"`` (the root document), ``"top"`` (the top of the
current page) or ``"none"`` (no link). ``show_sidebar_title = "false"`` shows
only the logo there, without the project title. Both are shown only when
``html_logo`` is set.

Footer
========================================================================

The footer is split into these blocks, in this order:

- ``footer_project``: the project name and version (``show_project`` /
  ``show_version``)
- ``footer_copyright``: "© Copyright ..." (``html_show_copyright``)
- ``footer_last_updated``: "Last updated on ..." (``html_last_updated_fmt``)
- ``footer_sphinx``: "Created using Sphinx ..." (``html_show_sphinx``)

To change some parts, add a ``_templates/layout.html`` to your project
(with ``templates_path = ["_templates"]`` in ``conf.py``) that overrides
only those blocks, for example:

.. code-block:: jinja

   {% extends "!layout.html" %}
   {% block footer_copyright %}&#169; 2026 Your Name{% endblock %}
   {% block footer_project %}{{ project }} v{{ version }}{% endblock %}

An overridden block is shown as it is: for example, ``footer_project`` above
is shown even if ``show_project`` and ``show_version`` are ``"false"``.

Enjoy writing docs!
