also looking at this
fix: keep documentation search results under docs
#106
5 files
+107
-1
| @@ -33,3 +33,23 @@ carry a patch onto another version. | ||
| 33 | 33 | |
| 34 | 34 | See `docs/runtime-updates.md` for the trust and clock limits. The extensions are |
| 35 | 35 | maintained 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 | |
| 40 | BunPress'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 | |
| 42 | result navigated to a 404. The patch applies the same base-path resolution after | |
| 43 | locale translation and fallback selection, preserving anchors and root-hosted | |
| 44 | sites. A real source directory named `docs` still receives the deployment prefix. | |
| 45 | ||
| 46 | The patch changes the native index builder and adds a small helper matching the renderer's path resolution; | |
| 47 | it adds no browser redirect or application search implementation. The installed | |
| 48 | package retains BunPress's MIT license. Regression coverage lives in | |
| 49 | `tests/unit/docs-search.test.ts`. Rebuild native docs and verify an actual search | |
| 50 | selection 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 | ||
| 53 | The shared engine fix is [BunPress PR 91](https://github.com/stacksjs/bunpress/pull/91), | |
| 54 | source commit `096004cc6e7b4800bfd1e90993866c9011ca706d`. Remove the compatibility | |
| 55 | patch only after upgrading to a release that includes it and repeating the checks. | |