full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

View File

@@ -6,6 +6,7 @@ import {
} from "../scripts.js";
import { renderAllHeadContent } from "./head.js";
import { isRenderInstruction } from "./instruction.js";
import { renderServerIslandRuntime } from "./server-islands.js";
import { isSlotString } from "./slot.js";
const Fragment = Symbol.for("astro:fragment");
const Renderer = Symbol.for("astro:renderer");
@@ -19,9 +20,11 @@ function stringifyChunk(result, chunk) {
const { hydration } = instruction;
let needsHydrationScript = hydration && determineIfNeedsHydrationScript(result);
let needsDirectiveScript = hydration && determinesIfNeedsDirectiveScript(result, hydration.directive);
let prescriptType = needsHydrationScript ? "both" : needsDirectiveScript ? "directive" : null;
if (prescriptType) {
let prescripts = getPrescripts(result, prescriptType, hydration.directive);
if (needsHydrationScript) {
let prescripts = getPrescripts(result, "both", hydration.directive);
return markHTMLString(prescripts);
} else if (needsDirectiveScript) {
let prescripts = getPrescripts(result, "directive", hydration.directive);
return markHTMLString(prescripts);
} else {
return "";
@@ -48,6 +51,13 @@ function stringifyChunk(result, chunk) {
}
return "";
}
case "server-island-runtime": {
if (result._metadata.hasRenderedServerIslandRuntime) {
return "";
}
result._metadata.hasRenderedServerIslandRuntime = true;
return renderServerIslandRuntime();
}
default: {
throw new Error(`Unknown chunk type: ${chunk.type}`);
}