@farming-labs/svelte 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +5 -1
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -278,9 +278,13 @@ export function createDocsServer(config = {}) {
|
|
|
278
278
|
const githubBranch = github?.branch ?? "main";
|
|
279
279
|
const githubContentPath = github?.directory;
|
|
280
280
|
const contentDir = path.resolve(config.contentDir ?? entry);
|
|
281
|
-
const
|
|
281
|
+
const rawPreloaded = config._preloadedContent;
|
|
282
282
|
const contentDirRel = config.contentDir ?? entry;
|
|
283
283
|
const dirPrefix = `/${contentDirRel}/`;
|
|
284
|
+
// Normalize keys: Vite's import.meta.glob may return paths without leading slash (e.g. "docs/...")
|
|
285
|
+
const preloaded = rawPreloaded
|
|
286
|
+
? Object.fromEntries(Object.entries(rawPreloaded).map(([k, v]) => [k.startsWith("/") ? k : `/${k}`, v]))
|
|
287
|
+
: undefined;
|
|
284
288
|
const ordering = config.ordering;
|
|
285
289
|
const aiConfig = config.ai ?? {};
|
|
286
290
|
// Allow top-level apiKey as a shorthand
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/svelte",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "SvelteKit adapter for @farming-labs/docs — content loading and navigation utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^22.10.0",
|
|
52
52
|
"typescript": "^5.9.3",
|
|
53
|
-
"@farming-labs/docs": "0.0.
|
|
53
|
+
"@farming-labs/docs": "0.0.8"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@farming-labs/docs": "*"
|