Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update branch #7

Merged
merged 61 commits into from
Mar 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
aacaac3
Fix extra whitespace in sidebars (#1115)
choldgraf Jan 13, 2023
6829b62
FIX: Use logo_url instead deprecated logo in theme (#1094) (#1097)
nicoa Jan 14, 2023
a0e8f14
ENH/MAINT: avoid overwriting the HtmlTranslator (#1105)
12rambau Jan 14, 2023
4889f73
fix: align sidebar sliding with the buttons (#1123)
12rambau Jan 22, 2023
4ce02b8
fix: use correct path for documentation logo
12rambau Jan 23, 2023
a6329b6
MAINT: Improve font sizing (#1129)
12rambau Jan 26, 2023
46ee983
MAINT: Refactor workflows to reduce test dependencies (#1136)
drammock Jan 27, 2023
6e080e1
MAINT: update prerelease workflow (#1140)
drammock Jan 27, 2023
48ecc06
ABlog: Updates for new HTML structure (#1118)
choldgraf Feb 1, 2023
05c2601
Bump to dev0
choldgraf Feb 3, 2023
f9f26d2
Standardize logo image behavior between Sphinx and this theme (#1132)
12rambau Feb 3, 2023
92fc50a
0.13.0rc1
choldgraf Feb 3, 2023
787cdf3
Build(deps): Bump http-cache-semantics from 4.1.0 to 4.1.1 (#1154)
dependabot[bot] Feb 4, 2023
949bb0e
DOC: Use only shield.io for badges in README (#1152)
12rambau Feb 5, 2023
d50d3aa
Copyright semicolon (#1160)
choldgraf Feb 5, 2023
c27f633
FIX: Flex behavior should shrink header items instead of brand (#1158)
bheberlein Feb 6, 2023
5c6ef9f
STYLE: lint the documentation with Doc8 (#1150)
12rambau Feb 6, 2023
7bea9f5
Add test for internationalization and translations (#1138)
choldgraf Feb 6, 2023
34520e5
FIX: Javascript incorrect check for variable (#1166)
choldgraf Feb 7, 2023
bcc1471
MAINT: update pypi classifiers (#1153)
12rambau Feb 7, 2023
75ee781
remove emoji from landing page (#1151)
12rambau Feb 7, 2023
3a59b4e
FIX: Narrow scope of style rule for GitHub & GitLab link shortening (…
bheberlein Feb 8, 2023
df125aa
ENH: Add breadcrumbs to article header (#1142)
choldgraf Feb 9, 2023
fb03af0
Degrade gracefully when JavaScript is disabled (#1146)
lunar-debian Feb 9, 2023
9025165
Fix header vertical spacing and jupyter-sphinx cells (#1164)
choldgraf Feb 10, 2023
7251a57
RLS: v0.13.0rc2 (#1170)
choldgraf Feb 10, 2023
121873d
DOCS: admonition customization (#1155)
12rambau Feb 13, 2023
30b2c52
Fix article header CSS (#1171)
choldgraf Feb 13, 2023
8d8bcb8
“Edit this page” → “Edit on GitHub/GitLab/Bitbucket” (#1177)
jeanas Feb 14, 2023
c9574e7
Properly handle default_mode=auto when writing logos (#1183)
lunar-debian Feb 15, 2023
bb4bad9
fix: correctly add DOM listeners (#1179)
drammock Feb 15, 2023
e81108b
maint: update GitLab URL tests (#1186)
drammock Feb 15, 2023
def7c72
Standardize template structure in more sections (#1184)
choldgraf Feb 15, 2023
9a10f9d
maint: remove sphinx-panels support; remove deprecated config shims (…
drammock Feb 16, 2023
ced262d
Minor style improvements to ablog (#1185)
choldgraf Feb 16, 2023
5079ab9
RLS: v0.13.0rc3
choldgraf Feb 16, 2023
71f1e2c
dev0
choldgraf Feb 16, 2023
41fde5f
FIX: Some style bugs (#1191)
choldgraf Feb 16, 2023
839c3bf
DOCS: Add internationalization instructions (#1178)
choldgraf Feb 17, 2023
ab42150
Refactor contributing docs to be more modular (#1173)
choldgraf Feb 17, 2023
97aa2d5
Dev0
choldgraf Feb 17, 2023
f1bbd96
Fix github gitlab brand (#1194)
choldgraf Feb 17, 2023
a5519c4
RLS: v0.13.0rc4
choldgraf Feb 17, 2023
371b451
FIX: Make wide equations scroll (#1196)
choldgraf Feb 17, 2023
c14c2b1
Fix math scrollbars for realz (#1198)
choldgraf Feb 17, 2023
0c0d6ca
copy_logo_images: do not render dynamic Sphinx template content (#1204)
jayaddison Feb 20, 2023
f6af62d
Add conditional check for last-updated template (#1201)
choldgraf Feb 22, 2023
4aa0673
Properly set configuration with app.builder.theme_options (#1199)
choldgraf Feb 22, 2023
9819171
Use CSS transform for skip link (#1206)
choldgraf Feb 23, 2023
8598864
feat: Add full i18n support (#1192)
jpmckinney Feb 23, 2023
5ab7536
Dev0
choldgraf Feb 23, 2023
b4c1c0b
FIX: Remove icon links component when no icon links given (#1209)
choldgraf Feb 23, 2023
619733f
RLS: 0.13.0rc5
choldgraf Feb 23, 2023
9223e6c
dev0
choldgraf Feb 23, 2023
686a27a
FIX: Get theme options in a more robust way (#1214)
choldgraf Feb 23, 2023
f21006d
RLS: v0.13.0rc6
choldgraf Feb 23, 2023
157c9ab
Make heading-style use the font-weight-heading value (#1213)
vkbo Feb 24, 2023
4e52d89
RLS: v0.13.0
12rambau Feb 28, 2023
eff4dcd
bump: dev0
12rambau Feb 28, 2023
2d245c9
DOCS: Remove <p> from announcement sample text (#1223)
choldgraf Mar 1, 2023
4a8d475
Merge branch 'favicons' into main-compat
12rambau Mar 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install (prerelease) dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade --pre -e .[test]
python -m pip install --upgrade --pre -e .[doc,test]

- name: Build docs to store
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install gettext for translations
run: |
sudo apt-get install gettext
- name: Build package
run: |
python -m pip install -U pip build
Expand Down
139 changes: 91 additions & 48 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: continuous-integration

# README
# ======
#
# All the jobs are defined with `matrix` for OS and Python version, even if we
# only run them on one combination of OS/Python. The reason for this is you get
# a nice side-effect that the OS and Python version of the job are listed in
# parentheses next to the job name in the Actions UI.

# This prevents workflows from being run twice on PRs
# ref: https://github.community/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662
on:
Expand All @@ -14,85 +22,123 @@ env:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- uses: pre-commit/action@v3.0.0

tests:
runs-on: ${{ matrix.os }}
# run our test suite on various combinations of OS / Python / Sphinx version
run-pytest:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
# legacy test
- os: ubuntu-latest
python-version: "3.7"
sphinx-version: "4.2"
# macos test
- os: macos-latest
python-version: "3.9"
python-version: "3.11"
# windows test
- os: windows-latest
python-version: "3.9"

python-version: "3.11"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
# if Sphinx version not specified in matrix, the constraints in the
# pyproject.toml file determine Sphinx version
if: false == matrix.sphinx-version
shell: bash
# setting shell to BASH and using PYTHONUTF8 env var makes the editable
# install work on Windows even though there are emoji in our README
run: |
export PYTHONUTF8=1
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e .[coverage]
python -m pip list

- name: Test Sphinx==4.2
if: matrix.python-version == '3.7'
python -m pip install -e .[test]
- name: Install dependencies (legacy Sphinx)
# here we override the pyproject.toml constraints to get a specific
# Sphinx version.
if: matrix.sphinx-version
run: |
python -m pip install sphinx==4.2
python -m pip list
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e .[test] sphinx==${{ matrix.sphinx-version }}
- name: Show installed versions
run: python -m pip list
- name: Compile MO files
run: |
pip install nox
nox -s compile
- name: Run tests
run: pytest --color=yes --cov pydata_sphinx_theme --cov-branch --cov-report term-missing:skip-covered --cov-fail-under ${{ env.COVERAGE_THRESHOLD }}

- name: Build docs to store
# Build our site on the 3 major OSes and check for Sphinx warnings
build-site:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e .[doc]
- name: Show installed versions
run: python -m pip list
- name: Build docs
run: sphinx-build -b html docs/ docs/_build/html --keep-going -w warnings.txt

- name: Check that there are no unexpected Sphinx warnings
if: matrix.python-version == '3.9'
- name: Check for unexpected Sphinx warnings
run: python tests/check_warnings.py

- name: Run the tests
run: pytest --color=yes --cov pydata_sphinx_theme --cov-branch --cov-report term-missing:skip-covered --cov-fail-under ${{ env.COVERAGE_THRESHOLD }}

- name: Upload coverage
if: ${{ always() }}
run: codecov

# Run local Lighthouse audit against built site
audit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]

os: [ubuntu-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install -e .[coverage]

python -m pip install -e .[doc]
- name: Show installed versions
run: python -m pip list
# We want to run the audit on a simplified documentation build so that
# the audit results aren't affected by non-theme things like extensions.
# Here we copy over just the kitchen sink into an empty docs site with
Expand All @@ -106,7 +152,6 @@ jobs:
echo 'html_theme = "pydata_sphinx_theme"' > audit/site/conf.py
echo '.. toctree::\n :glob:\n\n *' >> audit/site/index.rst
sphinx-build audit/site audit/_build

# The lighthouse audit runs directly on the HTML files, no serving needed
- name: Audit with Lighthouse
uses: treosh/lighthouse-ci-action@v9
Expand All @@ -118,30 +163,28 @@ jobs:

# Generate a profile of the code and upload as an artifact
profile:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8"]

os: [ubuntu-latest]
python-version: ["3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "pyproject.toml"

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools nox

python -m pip install -e .[test]
- name: Show installed versions
run: python -m pip list
- name: Generate a profile
run: |
nox -s profile
run: nox -s profile
continue-on-error: true

- uses: actions/upload-artifact@v3
with:
name: profile-results
Expand Down
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ coverage.xml
*.cover
.hypothesis/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
Expand Down Expand Up @@ -113,11 +109,15 @@ node_modules/
.vscode
.idea

# MacOSX store files
**/.DS_Store

# THEME FILES
# files from the gallery screenshots
docs/_static/gallery

# Our site profile tests
profile.svg

# MacOSX store files
**/.DS_Store
# Compiled translation files (are compiled at build time)
src/pydata_sphinx_theme/locale/*/*/*.mo
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
rev: v2.7.1
hooks:
- id: prettier
# Exclude the HTML, since it doesn't understand Jinja2
Expand Down Expand Up @@ -43,3 +43,8 @@ repos:
hooks:
- id: djlint-jinja
types_or: ["html"]

- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
hooks:
- id: doc8
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# The PyData Sphinx Theme

[![pypi](https://img.shields.io/pypi/v/pydata-sphinx-theme)](https://pypi.org/project/pydata-sphinx-theme/)
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/pydata-sphinx-theme.svg)](https://anaconda.org/conda-forge/pydata-sphinx-theme)
[![continuous-integration](https://github.com/pydata/pydata-sphinx-theme/actions/workflows/tests.yml/badge.svg)](https://github.com/pydata/pydata-sphinx-theme/actions/workflows/tests.yml)
[![docs](https://readthedocs.org/projects/pydata-sphinx-theme/badge/)](https://readthedocs.org/projects/pydata-sphinx-theme/builds/)
[![codecov](https://codecov.io/gh/pydata/pydata-sphinx-theme/branch/main/graph/badge.svg?token=NwOObjYacn)](https://codecov.io/gh/pydata/pydata-sphinx-theme)
[![License](https://img.shields.io/badge/License-BSD_3--Clause-yellow.svg)](https://github.com/pydata/pydata-sphinx-theme/blob/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/pydata-sphinx-theme?logo=python&logoColor=white&color=orange)](https://pypi.org/project/pydata-sphinx-theme/)
[![conda-forge](https://img.shields.io/conda/vn/conda-forge/pydata-sphinx-theme.svg?logo=anaconda&logoColor=white&color=orange)](https://anaconda.org/conda-forge/pydata-sphinx-theme)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/pydata/pydata-sphinx-theme/tests.yml?logo=github&logoColor=white)](https://github.com/pydata/pydata-sphinx-theme/actions/workflows/tests.yml)
[![Read the Docs (version)](https://img.shields.io/readthedocs/pydata-sphinx-theme/latest?logo=readthedocs&logoColor=white)](https://readthedocs.org/projects/pydata-sphinx-theme/builds/)
[![Codecov](https://img.shields.io/codecov/c/github/pydata/pydata-sphinx-theme?logo=codecov&logoColor=white)](https://codecov.io/gh/pydata/pydata-sphinx-theme)

A clean, three-column, Bootstrap-based Sphinx theme by and for the [PyData community](https://pydata.org).

- 📚 Documentation: https://pydata-sphinx-theme.readthedocs.io/en/stable
- 💡 Examples: https://pydata-sphinx-theme.readthedocs.io/en/stable/examples
- 🙌 Contribute: https://pydata-sphinx-theme.readthedocs.io/en/stable/community
- :books: Documentation: https://pydata-sphinx-theme.readthedocs.io/en/stable
- :bulb: Examples: https://pydata-sphinx-theme.readthedocs.io/en/stable/examples
- :raised_hands: Contribute: https://pydata-sphinx-theme.readthedocs.io/en/stable/community

[![Example documentation with this theme](./docs/_static/theme_landing.png)](https://pydata-sphinx-theme.readthedocs.io/en/stable)

Expand Down
5 changes: 5 additions & 0 deletions babel.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See https://github.com/sphinx-doc/sphinx/blob/6.1.x/babel.cfg
[jinja2: **.html]
encoding = utf-8
ignore_tags = script,style
include_attrs = alt title summary placeholder
16 changes: 8 additions & 8 deletions docs/_static/contributors.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- header: "@bollwyvl"
image: https://avatars.githubusercontent.com/u/45380
link: https://github.com/bollwyvl
website: https://github.com/bollwyvl
- header: "@jarrodmillman"
image: https://avatars.githubusercontent.com/u/123428
link: https://github.com/jarrodmillman
website: https://github.com/jarrodmillman
- header: "@hoetmaaiers"
image: https://avatars.githubusercontent.com/u/468045
link: https://github.com/hoetmaaiers
website: https://github.com/hoetmaaiers
- header: "@jorisvandenbossche"
image: https://avatars.githubusercontent.com/u/1020496
link: https://github.com/jorisvandenbossche
website: https://github.com/jorisvandenbossche
- header: "@damianavila"
image: https://avatars.githubusercontent.com/u/1640669
link: https://github.com/damianavila
website: https://github.com/damianavila
- header: "@drammock"
image: https://avatars.githubusercontent.com/u/1810515
link: https://github.com/drammock
website: https://github.com/drammock
- header: "@choldgraf"
image: https://avatars.githubusercontent.com/u/1839645
link: https://github.com/choldgraf
website: https://github.com/choldgraf
- header: "@12rambau"
image: https://avatars.githubusercontent.com/u/12596392
link: https://github.com/12rambau
website: https://github.com/12rambau
38 changes: 38 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,41 @@
background-color: var(--pst-color-success);
opacity: 0.1;
}

/* custom CSS classes (used in docs/user_guide/extending.rst) NOTE: the begin
* and end markers are necessary for partial file includes! don't remove them.
*/

/* begin-custom-color/* <your static path>/custom.css */

div.admonition.admonition-olive {
border-color: olive;
}
div.admonition.admonition-olive > .admonition-title:before {
background-color: olive;
}
div.admonition.admonition-olive > .admonition-title:after {
color: olive;
}
/* end-custom-color */

/* begin-custom-icon/* <your static path>/custom.css */

div.admonition.admonition-icon > .admonition-title:after {
content: "\f24e"; /* the fa-scale icon */
}
/* end-custom-icon */

/* begin-custom-youtube/* <your static path>/custom.css */

div.admonition.admonition-youtube {
border-color: #ff0000; /* YouTube red */
}
div.admonition.admonition-youtube > .admonition-title:before {
background-color: #ff0000;
}
div.admonition.admonition-youtube > .admonition-title:after {
color: #ff0000;
content: "\f26c"; /* fa-solid fa-tv */
}
/* end-custom-youtube */
Loading