Skip to content

Commit 8ddc57a

Browse files
authored
Update theme to be compatible with pst~=0.13 (#3)
* Update version to match major.minor in pst * Update publish action * update edit_this_page to pst 0.13 * Update versions of dependencies * update edit page button condition
1 parent 2f7430f commit 8ddc57a

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

.github/workflows/publish.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,16 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up Python
18-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v4
1919
with:
20-
python-version: 3.7
20+
python-version: "3.10"
2121
- name: Install build dependencies
2222
run: python -m pip install build
2323
- name: Build package
2424
run: python -m build
2525
- name: Publish to PyPI
26-
uses: pypa/gh-action-pypi-publish@release/v1.4
26+
uses: pypa/gh-action-pypi-publish@release/v1
2727
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
2828
with:
2929
user: __token__
3030
password: ${{ secrets.PYPI_API_TOKEN }}
31-
- name: Create GitHub release
32-
uses: softprops/action-gh-release@v1
33-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

pyproject.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ classifiers = [
2424
]
2525
dynamic = ["version", "description"]
2626
dependencies = [
27-
"pydata-sphinx-theme>=0.12.0,<0.13",
28-
"sphinx>=4,<6",
29-
"docutils==0.17.1",
27+
"pydata-sphinx-theme>=0.13.0,<0.14",
28+
"sphinx>=5,<7",
3029
]
3130

3231
[tool.flit.module]

src/pymc_sphinx_theme/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""A thin sphinx theme to customize pydata-sphinx-theme consistently cross PyMC websites."""
22

3-
__version__ = "0.1"
3+
__version__ = "0.13.0"
44

55
from pathlib import Path
66

Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
{% if sourcename is defined and page_source_suffix and "generated" not in sourcename %}
2-
{% set src = sourcename.split('.') %}
3-
<div class="tocsection editthispage">
4-
<a href="{{ get_edit_url() }}">
5-
<i class="fas fa-pencil-alt"></i> {{ _("Edit this page") }}
2+
{% set src = sourcename.split('.') %}
3+
<div class="tocsection editthispage">
4+
<a href="{{ get_edit_provider_and_url()[1] }}">
5+
<i class="fa-solid fa-pencil"></i>
6+
{% set provider = get_edit_provider_and_url()[0] %}
7+
{% block edit_this_page_text %}
8+
{% if provider %}
9+
{% trans provider=provider %}Edit on {{ provider }}{% endtrans %}
10+
{% else %}
11+
{% trans %}Edit{% endtrans %}
12+
{% endif %}
13+
{% endblock %}
614
</a>
7-
</div>
15+
</div>
816
{% endif %}

0 commit comments

Comments
 (0)