${statusCode ? `${statusCode}: ` : ''}${title}
- ${ - body || - ` -Path: ${encode(pathname)}- ` - } -
diff --git a/.changeset/spotty-turtles-complain.md b/.changeset/spotty-turtles-complain.md new file mode 100644 index 000000000000..021eac91fd9f --- /dev/null +++ b/.changeset/spotty-turtles-complain.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fix preview issues triggered by pageUrlFormat & trailingSlash options diff --git a/packages/astro/src/core/dev/template/4xx.ts b/packages/astro/src/core/dev/template/4xx.ts index af63feea7cfe..7f90b6e16a5d 100644 --- a/packages/astro/src/core/dev/template/4xx.ts +++ b/packages/astro/src/core/dev/template/4xx.ts @@ -17,45 +17,45 @@ interface ErrorTemplateOptions { /** Display all errors */ export default function template({ title, pathname, statusCode = 404, tabTitle, body }: ErrorTemplateOptions): string { return ` - -
- -Path: ${encode(pathname)}- ` - } -
Path: ${encode(pathname)}+ ` + } +