Skip to content

Commit da114a8

Browse files
committed
Fix redirect loop when not using plugin version
1 parent 5fa1312 commit da114a8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Pydantic's HISTORY.md](https://github.com/pydantic/pydantic/blob/main/HISTORY.md), and this project *mostly* adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## `1!0.1.0a33`
8+
9+
### Fixed
10+
11+
* Fixed the web book being overwritten by a redirect page if the plugin version is removed from the site path.
12+
713
## `1!0.1.0a32`
814

915
### Added

src/hexdoc/cli/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,9 @@ def merge(
355355
continue
356356

357357
redirects[plugin.site_root / version] = item.default_marker.redirect_contents
358-
for lang, marker in item.markers.items():
359-
redirects[plugin.site_root / version / lang] = marker.redirect_contents
358+
if plugin.site_root / version != plugin.versioned_site_path: # hacky hacky
359+
for lang, marker in item.markers.items():
360+
redirects[plugin.site_root / version / lang] = marker.redirect_contents
360361

361362
item_version = Version(version)
362363
if not root_version or item_version > root_version:

0 commit comments

Comments
 (0)