All repositories

astro-lunr

License

Lunr integration for Astro; client-side search for statically hosted pages.

2022-05-14 17:06 #1: fixed base path replacement problem
Siver K. Volle 3f44311
2022-05-14 17:06 #1: fixed base path replacement problem master Siver K. Volle 3f44311
2022-05-01 13:57 Fixed problem with import.meta.env when proper npm-module Siver K. Volle 00a915f
2022-04-18 20:31 add demo-link to readme Siver K. Volle d930b81
2022-04-18 19:51 initial steps to turn astro-lunr into its own repo Siver K. Volle 9983ab3
2022-04-18 18:39 better lunr in dev-mode; better file diffs Siver K. Volle 182546c
2022-04-17 19:29 support for github pages; max-lines in file view Siver K. Volle 1612826
2022-04-16 00:25 Included readme and licenses; made the plugins into npm-modules; removed more dead-links and ui/ux-bugs Siver K. Volle 077a354
2022-04-15 17:21 Multi-repo support; refactored astro-git and astro-lunr into independent plugins Siver K. Volle adfedbe
2022-04-14 10:00 lunr-based indexing and search integration; assorted minor ux/ui improvements Siver K. Volle 146ebb5

Differences for commit 3f4431111825321d93a836e2410e747f3d74e46b

package.json | +1L -1L 7% changed
to file
0 {
1 "name": "@siverv/astro-lunr",
2 - "version": "0.0.2",
3 + "version": "0.0.3",
4 "license" : "GPL-3.0",
5 "description": "Lunr integration for Astro",
...
26 "rehype": "^12.0.1"
27 }
plugin.mjs | +3L -4L 4% changed
to file
0 import fs from 'node:fs';
1 import path from 'node:path';
...
61 viteServer.middlewares.use((req, res, next) => {
62 if(req.url.endsWith("/idx.json") || req.url.endsWith("/docs.json")){
63 - let path = req.url.slice(1);
64 - if(config.base && config.base != "./"){
65 - let base = config.base.startsWith("./") ? config.base.slice(2) : config.base;
66 - path = path.replace(base, "./");
67 + let path = req.url;
68 + if(config.base && path.startsWith(config.base)){
69 + path = path.replace(config.base, "");
70 }
71 let preBuiltPath = new URL(path, config.outDir);
...
159 }
160 }
README.md | -2L 2% changed
to file
0
1
...
33 | `verbose` | boolean | Debug log |
34
35 - If using `subDir` or the astro-config `base`, set the env-variable `PUBLIC_LUNR_DIR` to be `/base/subDir/`
36 -
37 ### Example from astro-git-view
38
...
111 To properly search files that are not usually genereated in the build-step, you would need to have a separate build-step that includes all pages that might be generated.
112