Skip to content

Commit e4f0b8d

Browse files
authored
Merge pull request #585 from Pipelex/release/v0.17.5
Release/v0.17.5
2 parents 43da6fc + 2cfb386 commit e4f0b8d

6 files changed

Lines changed: 74 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [v0.17.5] - 2026-01-16
4+
5+
- Added target `make docs-deploy-404` to deploy the 404.html file to the gh-pages root for versionless URL redirects.
6+
37
## [v0.17.4] - 2026-01-16
48

59
### Added

Makefile

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ make docs-list - List deployed documentation versions
104104
make docs-deploy VERSION=x.y.z - Deploy docs as version x.y.z (local, no push)
105105
make docs-deploy-stable - Deploy stable docs with 'latest' alias (CI only)
106106
make docs-deploy-beta - Manually deploy pre-release docs with '-beta' suffix
107+
make docs-deploy-404 - Deploy 404.html for versionless URL redirects
107108

108109
make check - Shorthand -> format lint mypy
109110
make c - Shorthand -> check
@@ -128,7 +129,8 @@ export HELP
128129
merge-check-ruff-lint merge-check-ruff-format merge-check-mypy merge-check-pyright \
129130
li check-unused-imports fix-unused-imports check-uv check-TODOs \
130131
docs docs-check docs-serve-versioned docs-list docs-deploy docs-deploy-stable docs-deploy-beta \
131-
test-count check-test-badge
132+
test-count check-test-badge \
133+
docs-deploy-404
132134

133135
all help:
134136
@echo "$$HELP"
@@ -557,15 +559,26 @@ docs-deploy: env
557559
$(call PRINT_TITLE,"Deploying documentation version $(if $(VERSION),$(VERSION),$(DOCS_VERSION))")
558560
$(VENV_MIKE) deploy $(if $(VERSION),$(VERSION),$(DOCS_VERSION))
559561

560-
docs-deploy-stable: env
562+
docs-deploy-stable: env docs-deploy-404
561563
$(call PRINT_TITLE,"Deploying stable documentation $(DOCS_VERSION) with latest alias")
562564
$(VENV_MIKE) deploy --push --update-aliases $(DOCS_VERSION) latest
563565
$(VENV_MIKE) set-default --push latest
564566

565-
docs-deploy-beta: env
567+
docs-deploy-beta: env docs-deploy-404
566568
$(call PRINT_TITLE,"Deploying pre-release documentation $(DOCS_VERSION)-beta")
567569
$(VENV_MIKE) deploy --push $(DOCS_VERSION)-beta
568570

571+
docs-deploy-404:
572+
$(call PRINT_TITLE,"Deploying 404.html to gh-pages root for versionless URL redirects")
573+
@TMPDIR=$$(mktemp -d); \
574+
trap "cd '$(CURDIR)'; git worktree remove '$$TMPDIR' 2>/dev/null || true; rm -rf '$$TMPDIR'" EXIT; \
575+
git worktree add "$$TMPDIR" gh-pages && \
576+
cp docs/404.html "$$TMPDIR/404.html" && \
577+
cd "$$TMPDIR" && \
578+
git add 404.html && \
579+
(git diff --cached --quiet || git commit -m "Update 404.html for versionless URL redirects") && \
580+
git push origin gh-pages
581+
569582
##########################################################################################
570583
### SHORTHANDS
571584
##########################################################################################

docs/404.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Redirecting...</title>
6+
<script>
7+
const path = window.location.pathname;
8+
// Get path segments (e.g., "/latest/foo/bar" → ["latest", "foo", "bar"])
9+
const segments = path.split('/').filter(seg => seg);
10+
const firstSegment = segments[0];
11+
12+
// Check if it's a version: either "latest" or starts with "0." (e.g., "0.17")
13+
const hasVersion = firstSegment === 'latest' || (firstSegment && firstSegment.startsWith('0.'));
14+
15+
// Check if we're on a version's root 404 page (exactly /{version}/404.html)
16+
const isVersionRoot404 = segments.length === 2 && segments[1] === '404.html';
17+
18+
if (!hasVersion) {
19+
// No version in URL, redirect to /latest/...
20+
const newUrl = '/latest' + path + window.location.search + window.location.hash;
21+
window.location.replace(newUrl);
22+
} else if (isVersionRoot404 && firstSegment !== 'latest') {
23+
// We tried a version's 404.html but it doesn't exist (invalid version)
24+
// Fall back to /latest/404.html
25+
window.location.replace('/latest/404.html');
26+
} else if (!isVersionRoot404) {
27+
// Has version but not on 404 page, redirect to that version's styled 404 page
28+
const version404Url = '/' + firstSegment + '/404.html';
29+
window.location.replace(version404Url);
30+
} else {
31+
// We're on /latest/404.html and it still 404'd - show basic error
32+
document.write('<h1>Page not found</h1><p>The page you requested does not exist. <a href="/latest/">Go to documentation</a>.</p>');
33+
}
34+
</script>
35+
</head>
36+
<body>
37+
<noscript>
38+
<h1>Page not found</h1>
39+
<p>Enable JavaScript for automatic redirects, or go to <a href="/latest/">the documentation</a>.</p>
40+
</noscript>
41+
</body>
42+
</html>

docs/404.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
template: main.html
3+
title: Page not found
4+
---
5+
6+
# Page not found
7+
8+
The page you requested does not exist.
9+
10+
[Return to the documentation homepage](index.md){ .md-button .md-button--primary }

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "pipelex"
3-
version = "0.17.4"
3+
version = "0.17.5"
44
description = "The open standard for repeatable AI workflows. Write business logic, not API calls."
55
authors = [{ name = "Evotis S.A.S.", email = "oss@pipelex.com" }]
66
maintainers = [{ name = "Pipelex staff", email = "oss@pipelex.com" }]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)