@farming-labs/svelte 0.1.131 → 0.1.132
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 -3
- package/package.json +2 -2
package/dist/server.js
CHANGED
|
@@ -661,9 +661,9 @@ export function createDocsServer(config = {}) {
|
|
|
661
661
|
return locale;
|
|
662
662
|
return i18n.defaultLocale;
|
|
663
663
|
}
|
|
664
|
-
function getMarkdownDocument(ctx, requestedPath) {
|
|
664
|
+
function getMarkdownDocument(ctx, requestedPath, origin) {
|
|
665
665
|
const page = findDocsMarkdownPage(entry, getSearchIndex(ctx), requestedPath);
|
|
666
|
-
return page ? renderDocsMarkdownDocument(page, { sitemap: config.sitemap }) : null;
|
|
666
|
+
return page ? renderDocsMarkdownDocument(page, { origin, sitemap: config.sitemap }) : null;
|
|
667
667
|
}
|
|
668
668
|
// ─── GET /api/docs?query=… | ?format=llms | ?format=llms-full ──
|
|
669
669
|
async function GET(event) {
|
|
@@ -822,7 +822,8 @@ export function createDocsServer(config = {}) {
|
|
|
822
822
|
return robotsResponse;
|
|
823
823
|
const markdownRequest = resolveDocsMarkdownRequest(entry, event.url, event.request);
|
|
824
824
|
if (markdownRequest) {
|
|
825
|
-
const
|
|
825
|
+
const markdownOrigin = llmsBaseUrl || event.url.origin;
|
|
826
|
+
const document = getMarkdownDocument(ctx, markdownRequest.requestedPath, markdownOrigin);
|
|
826
827
|
const varyHeader = getDocsMarkdownVaryHeader(event.request);
|
|
827
828
|
const canonicalLinkHeader = getDocsMarkdownCanonicalLinkHeader({
|
|
828
829
|
origin: event.url.origin,
|
|
@@ -850,6 +851,7 @@ export function createDocsServer(config = {}) {
|
|
|
850
851
|
return new Response(renderDocsMarkdownNotFound({
|
|
851
852
|
entry,
|
|
852
853
|
requestedPath: markdownRequest.requestedPath,
|
|
854
|
+
origin: markdownOrigin,
|
|
853
855
|
pages: getSearchIndex(ctx),
|
|
854
856
|
sitemap: config.sitemap,
|
|
855
857
|
}), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@farming-labs/svelte",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.132",
|
|
4
4
|
"description": "SvelteKit adapter for @farming-labs/docs — content loading and navigation utilities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"docs",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/node": "^22.10.0",
|
|
58
58
|
"typescript": "^5.9.3",
|
|
59
|
-
"@farming-labs/docs": "0.1.
|
|
59
|
+
"@farming-labs/docs": "0.1.132"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@farming-labs/docs": "*"
|