ReviewOS

also looking at this

stacks/drone

fix: keep documentation search results under docs

#106
Merged chris wants to merge codex/docs-search-base-path into main
5 files +107 -1
patches/README.mdmodified+20-0
Changes to patches/README.md
@@ -33,3 +33,23 @@ carry a patch onto another version.
3333
3434See `docs/runtime-updates.md` for the trust and clock limits. The extensions are
3535maintained here and are not claimed to be unmodified upstream options.
36
37## BunPress 0.2.22
38
39`@stacksjs%2Fbunpress@0.2.22.patch` keeps generated local search results under
40BunPress's configured deployment path. The native page renderer already uses
41`/docs`, but 0.2.22's search index contained origin-root paths, so selecting a
42result navigated to a 404. The patch applies the same base-path resolution after
43locale translation and fallback selection, preserving anchors and root-hosted
44sites. A real source directory named `docs` still receives the deployment prefix.
45
46The patch changes the native index builder and adds a small helper matching the renderer's path resolution;
47it adds no browser redirect or application search implementation. The installed
48package retains BunPress's MIT license. Regression coverage lives in
49`tests/unit/docs-search.test.ts`. Rebuild native docs and verify an actual search
50selection after upgrading or removing this patch. Prepare installed changes with
51`bun patch @stacksjs/bunpress@0.2.22` and retain the generated Bun patch and lockfile.
52
53The shared engine fix is [BunPress PR 91](https://github.com/stacksjs/bunpress/pull/91),
54source commit `096004cc6e7b4800bfd1e90993866c9011ca706d`. Remove the compatibility
55patch only after upgrading to a release that includes it and repeating the checks.