Skip to content

Commit

Permalink
Merge branch 'master' into searchfield
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jul 15, 2024
2 parents a5ad341 + 6120f75 commit f1e6e35
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "ruff==0.1.11"
python -m pip install "ruff==0.5.2"
- name: Lint with Ruff
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ jobs:
fail-fast: false
matrix:
sphinx-version:
- "4.5"
- "5.3"
- "6.2"
- "7.2"
- "7.4"
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand Down Expand Up @@ -92,7 +90,7 @@ jobs:
- name: Install Sphinx
run: |
python -m pip install -U pip
python -m pip install "sphinx~=3.4.0" "Jinja2<3.1" "docutils<0.18"
python -m pip install "sphinx~=6.2.0"
python -m pip install .
- name: Run Sphinx
Expand Down
4 changes: 2 additions & 2 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
target-version = "py39" # Pin Ruff to Python 3.9
show-source = true
target-version = "py310" # Pin Ruff to Python 3.10
output-format = "full"

[lint]
preview = true
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ What is Alabaster?

Alabaster is a visually (c)lean, responsive, configurable theme for the `Sphinx
<https://www.sphinx-doc.org>`_ documentation system.
It requires Python 3.9 or newer and Sphinx 3.4 or newer.
It requires Python 3.10 or newer and Sphinx 6.2 or newer.

It began as a third-party theme, and is still maintained separately, but as of
Sphinx 1.3, Alabaster is an install-time dependency of Sphinx and is selected
Expand Down
8 changes: 6 additions & 2 deletions alabaster/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ def update_context(app, pagename, templatename, context, doctree):


def setup(app):
app.require_sphinx("3.4")
app.require_sphinx("6.2")
theme_path = os.path.abspath(os.path.dirname(__file__))
app.add_html_theme("alabaster", theme_path)
app.connect("html-page-context", update_context)
return {"version": __version__, "parallel_read_safe": True}
return {
"version": __version__,
"parallel_read_safe": True,
"parallel_write_safe": True,
}
12 changes: 8 additions & 4 deletions alabaster/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

{%- block extrahead %}
{{ super() }}
<link rel="stylesheet" href="{{ pathto('_static/custom.css', 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/custom.css', resource=True) }}" type="text/css" />
{% if theme_touch_icon %}
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, resource=True) }}" />
{% endif %}

{# Deprecated in favor of html_baseurl (pageurl). This is already set in the basic theme #}
Expand Down Expand Up @@ -95,14 +95,18 @@
{% endif %}
{%- if show_source and has_source and sourcename %}
{% if show_copyright or show_sphinx %}|{% endif %}
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
<a href="{{ pathto('_sources/' + sourcename, resource=True)|e }}"
rel="nofollow">{{ _('Page source') }}</a>
{%- endif %}
</div>

{% if theme_github_banner|lower != 'false' %}
<a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github">
<img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ pathto('_static/' ~ theme_github_banner, 1) if theme_github_banner|lower != 'true' else 'https://github.blog/wp-content/uploads/2008/12/forkme_right_darkblue_121621.png' }}" alt="Fork me on GitHub" class="github"/>
{%- if theme_github_banner|lower == 'true' %}
<img src="{{ pathto('_static/github-banner.svg', resource=True) }}" alt="Fork me on GitHub" class="github"/>
{%- else %}
<img src="{{ pathto('_static/' ~ theme_github_banner, resource=True) }}" alt="Fork me on GitHub" class="github"/>
{%- endif %}
</a>
{% endif %}

Expand Down
7 changes: 7 additions & 0 deletions alabaster/static/alabaster.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -778,3 +778,10 @@ nav#breadcrumbs li+li:before {
display: none;
}
}

img.github {
position: absolute;
top: 0;
border: 0;
right: 0;
}
5 changes: 5 additions & 0 deletions alabaster/static/github-banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ruff==0.1.11
ruff==0.5.2

# Install ourselves direct, even when being used on eg RTD. Otherwise we can't
# dogfood our own changes until release to PyPI.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"sphinx.ext.extlinks",
]
templates_path = ["_templates"]
source_suffix = ".rst"
master_doc = "index"

project = "Alabaster"
Expand Down Expand Up @@ -35,4 +34,5 @@
"github_repo": "alabaster",
"fixed_sidebar": True,
"tidelift_url": "https://tidelift.com/subscription/pkg/pypi-alabaster?utm_source=pypi-alabaster&utm_medium=referral&utm_campaign=docs", # noqa
"github_banner": True,
}
2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Installation
============

Alabaster requires **Sphinx 3.4 or newer**, and is included as the default
Alabaster requires **Sphinx 6.2 or newer**, and is included as the default
theme.

.. note::
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Sphinx>=3.4
Sphinx>=6.2
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ urls.Homepage = "https://alabaster.readthedocs.io/"
urls."Issue tracker" = "https://github.com/sphinx-doc/alabaster/issues"
urls.Source = "https://github.com/sphinx-doc/alabaster"
license.text = "BSD-3-Clause"
requires-python = ">=3.9"
requires-python = ">=3.10"

# Classifiers list: https://pypi.org/classifiers/
classifiers = [
Expand All @@ -26,7 +26,6 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand Down

0 comments on commit f1e6e35

Please sign in to comment.