${statusCode ? `${statusCode}: ` : ""}${title}
${body || `Path: ${escape(pathname)}`}
import { appendForwardSlash, removeTrailingForwardSlash } from "@astrojs/internal-helpers/path"; import { escape } from "html-escaper"; function template({ title, pathname, statusCode = 404, tabTitle, body }) { return `
Path: ${escape(pathname)}`}
In your site
you have your base path set to ${base}. Do you want to go there instead?
Come to our Discord if you need help.
` }); } function trailingSlashMismatchTemplate(pathname, trailingSlash) { const corrected = trailingSlash === "always" ? appendForwardSlash(pathname) : removeTrailingForwardSlash(pathname); return template({ pathname, statusCode: 404, title: "Not found", tabTitle: "404: Not Found", body: `Your site is configured with trailingSlash
set to ${trailingSlash}
. Do you want to go to ${corrected} instead?
See the documentation for trailingSlash
if you need help.