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

@@ -2,7 +2,7 @@ import * as fs from "node:fs";
import path from "node:path";
import { appendForwardSlash } from "@astrojs/internal-helpers/path";
import { bold } from "kleur/colors";
import notFoundTemplate, { subpathNotUsedTemplate } from "../template/4xx.js";
import { notFoundTemplate, subpathNotUsedTemplate } from "../template/4xx.js";
import { writeHtmlResponse } from "./response.js";
function baseMiddleware(settings, logger) {
const { config } = settings;
@@ -27,12 +27,7 @@ function baseMiddleware(settings, logger) {
return writeHtmlResponse(res, 404, html);
}
if (req.headers.accept?.includes("text/html")) {
const html = notFoundTemplate({
statusCode: 404,
title: "Not found",
tabTitle: "404: Not Found",
pathname
});
const html = notFoundTemplate(pathname);
return writeHtmlResponse(res, 404, html);
}
const publicPath = new URL("." + req.url, config.publicDir);