Skip to content

Commit

Permalink
Merge branch 'main' into pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 authored Dec 12, 2023
2 parents 844a23f + 172e0e7 commit cc3bb23
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: install flit
Expand Down
44 changes: 44 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
# Change Log

## v1.0.1 - 2023-12-12

([full changelog](https://github.com/executablebooks/sphinx-external-toc/compare/v1.0.0...21adcf94ca0e09e7fbce21bf87734435520169f2))

### Bugs fixed

- FIX: rework 104 to support e.g. PDFHTML [#105](https://github.com/executablebooks/sphinx-external-toc/pull/105) ([@agoose77](https://github.com/agoose77))
- FIX: exit if non-html builder [#104](https://github.com/executablebooks/sphinx-external-toc/pull/104) ([@agoose77](https://github.com/agoose77))
- FIX: simple grammatical error in `index.md` [#100](https://github.com/executablebooks/sphinx-external-toc/pull/100) ([@kallewesterling](https://github.com/kallewesterling))

### Maintenance and upkeep improvements

- MAINT: update changelog via github-activity [#102](https://github.com/executablebooks/sphinx-external-toc/pull/102) ([@agoose77](https://github.com/agoose77))

### Other merged PRs

- Bump actions/setup-python from 4 to 5 [#103](https://github.com/executablebooks/sphinx-external-toc/pull/103) ([@dependabot](https://github.com/dependabot))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/executablebooks/sphinx-external-toc/graphs/contributors?from=2023-11-08&to=2023-12-12&type=c))

[@agoose77](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Aagoose77+updated%3A2023-11-08..2023-12-12&type=Issues) | [@codecov](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Acodecov+updated%3A2023-11-08..2023-12-12&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Adependabot+updated%3A2023-11-08..2023-12-12&type=Issues) | [@kallewesterling](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Akallewesterling+updated%3A2023-11-08..2023-12-12&type=Issues) | [@welcome](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Awelcome+updated%3A2023-11-08..2023-12-12&type=Issues)



## 1.0.0 - 2023-11-08

([full changelog](https://github.com/executablebooks/sphinx-external-toc/compare/v0.3.1...9e8cc1f92d84fed6eb9602371709b6a88e47f688))

### Merged PRs

- maint: add ruff [#101](https://github.com/executablebooks/sphinx-external-toc/pull/101) ([@agoose77](https://github.com/agoose77))
- Bump actions/checkout from 3 to 4 [#98](https://github.com/executablebooks/sphinx-external-toc/pull/98) ([@dependabot](https://github.com/dependabot))
- chore: update versioning [#97](https://github.com/executablebooks/sphinx-external-toc/pull/97) ([@agoose77](https://github.com/agoose77))
- fixes https://github.com/executablebooks/jupyter-book/issues/1414 [#94](https://github.com/executablebooks/sphinx-external-toc/pull/94) ([@jdsalaro](https://github.com/jdsalaro))
- [pre-commit.ci] pre-commit autoupdate [#82](https://github.com/executablebooks/sphinx-external-toc/pull/82) ([@pre-commit-ci](https://github.com/pre-commit-ci))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/executablebooks/sphinx-external-toc/graphs/contributors?from=2022-11-24&to=2023-12-04&type=c))

[@agoose77](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Aagoose77+updated%3A2022-11-24..2023-12-04&type=Issues) | [@codecov](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Acodecov+updated%3A2022-11-24..2023-12-04&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Adependabot+updated%3A2022-11-24..2023-12-04&type=Issues) | [@jdsalaro](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Ajdsalaro+updated%3A2022-11-24..2023-12-04&type=Issues) | [@mmcky](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Ammcky+updated%3A2022-11-24..2023-12-04&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Apre-commit-ci+updated%3A2022-11-24..2023-12-04&type=Issues) | [@welcome](https://github.com/search?q=repo%3Aexecutablebooks%2Fsphinx-external-toc+involves%3Awelcome+updated%3A2022-11-24..2023-12-04&type=Issues)

## 0.3.1 - 2022-11-25

- ⬆️ UPGRADE: Support `sphinx5` [#85](https://github.com/executablebooks/sphinx-external-toc/pull/85)
Expand Down
2 changes: 1 addition & 1 deletion docs/example/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Example Project

These pages provide an example of different aspects of the ToC.
See this projects `_toc.yml` for how they are added.
See this project's `_toc.yml` for how they are added.
2 changes: 1 addition & 1 deletion sphinx_external_toc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""A sphinx extension that allows the project toctree to be defined in a single file."""

__version__ = "1.0.0"
__version__ = "1.0.1"


from typing import TYPE_CHECKING
Expand Down
7 changes: 4 additions & 3 deletions sphinx_external_toc/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,11 @@ def ensure_index_file(app: Sphinx, exception: Optional[Exception]) -> None:

root_name = remove_suffix(app.config.master_doc, app.config.source_suffix)

if app.builder.name == "html":
redirect_url = f"{root_name}.html"
elif app.builder.name == "dirhtml":
if app.builder.name == "dirhtml":
redirect_url = f"{root_name}/index.html"
else:
# Assume a single index for all non dir-HTML builders
redirect_url = f"{root_name}.html"

redirect_text = f'<meta http-equiv="Refresh" content="0; url={redirect_url}" />\n'
index_path.write_text(redirect_text, encoding="utf8")
Expand Down

0 comments on commit cc3bb23

Please sign in to comment.