Links: trailing-slash internal URLs (no dir-redirect → kills the :8080/cached-301 issue)
build-and-deploy / build (push) Failing after 13m10s

This commit is contained in:
2026-06-17 20:48:06 +10:00
parent a729484c7a
commit 1dc9c82cb3
9 changed files with 16 additions and 13 deletions
+3
View File
@@ -7,6 +7,9 @@ import tailwindcss from "@tailwindcss/vite";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: "https://www.bztmon.com", site: "https://www.bztmon.com",
// Always emit/expect trailing slashes so internal links hit the final URL directly
// (no nginx dir-redirect → no stray :8080 / cached 301s).
trailingSlash: "always",
integrations: [sitemap()], integrations: [sitemap()],
build: { build: {
// Keep CSS in external files (no inlined <style> blocks) — friendlier to a strict CSP. // Keep CSS in external files (no inlined <style> blocks) — friendlier to a strict CSP.
+2 -2
View File
@@ -5,8 +5,8 @@ import { site } from "../data/site";
const links = [ const links = [
{ label: "About", href: "/#about" }, { label: "About", href: "/#about" },
{ label: "Skills", href: "/#skills" }, { label: "Skills", href: "/#skills" },
{ label: "Projects", href: "/projects" }, { label: "Projects", href: "/projects/" },
{ label: "Blog", href: "/blog" }, { label: "Blog", href: "/blog/" },
{ label: "Contact", href: "/#contact" }, { label: "Contact", href: "/#contact" },
]; ];
--- ---
+1 -1
View File
@@ -13,7 +13,7 @@ const { posts } = Astro.props;
{ {
posts.map((post) => ( posts.map((post) => (
<li class="post" data-reveal> <li class="post" data-reveal>
<a class="post__link" href={`/blog/${post.id}`}> <a class="post__link" href={`/blog/${post.id}/`}>
<div class="post__meta mono"> <div class="post__meta mono">
<time datetime={post.data.date.toISOString()}>{formatDate(post.data.date)}</time> <time datetime={post.data.date.toISOString()}>{formatDate(post.data.date)}</time>
<span class="post__sep">·</span> <span class="post__sep">·</span>
+1 -1
View File
@@ -5,7 +5,7 @@ interface Props {
} }
const { entry } = Astro.props; const { entry } = Astro.props;
const p = entry.data; const p = entry.data;
const href = `/projects/${entry.id}`; const href = `/projects/${entry.id}/`;
--- ---
<a class="project card" href={href} data-reveal> <a class="project card" href={href} data-reveal>
+3 -3
View File
@@ -14,10 +14,10 @@ const { entry } = Astro.props;
const { Content } = await render(entry); const { Content } = await render(entry);
--- ---
<Layout title={entry.data.title} path={`/blog/${entry.id}`} description={entry.data.summary}> <Layout title={entry.data.title} path={`/blog/${entry.id}/`} description={entry.data.summary}>
<article class="post"> <article class="post">
<div class="container post__inner"> <div class="container post__inner">
<a class="post__back mono" href="/blog">← All posts</a> <a class="post__back mono" href="/blog/">← All posts</a>
<header class="post__head" data-reveal> <header class="post__head" data-reveal>
<div class="post__meta mono"> <div class="post__meta mono">
@@ -28,7 +28,7 @@ const { Content } = await render(entry);
<h1 class="post__title">{entry.data.title}</h1> <h1 class="post__title">{entry.data.title}</h1>
<ul class="post__tags"> <ul class="post__tags">
{entry.data.tags.map((t) => ( {entry.data.tags.map((t) => (
<li><a class="tag" href={`/blog/tags/${t}`}>{t}</a></li> <li><a class="tag" href={`/blog/tags/${t}/`}>{t}</a></li>
))} ))}
</ul> </ul>
</header> </header>
+1 -1
View File
@@ -18,7 +18,7 @@ const tags = allTags(posts);
<nav class="blog__tags" aria-label="Filter by tag" data-reveal> <nav class="blog__tags" aria-label="Filter by tag" data-reveal>
<span class="mono blog__tags-label">tags:</span> <span class="mono blog__tags-label">tags:</span>
{tags.map((t) => ( {tags.map((t) => (
<a class="tag blog__tag" href={`/blog/tags/${t}`}>{t}</a> <a class="tag blog__tag" href={`/blog/tags/${t}/`}>{t}</a>
))} ))}
</nav> </nav>
)} )}
+2 -2
View File
@@ -17,10 +17,10 @@ export const getStaticPaths = (async () => {
const { tag, posts } = Astro.props; const { tag, posts } = Astro.props;
--- ---
<Layout title={`#${tag}`} path={`/blog/tags/${tag}`} description={`Posts tagged ${tag}.`}> <Layout title={`#${tag}`} path={`/blog/tags/${tag}/`} description={`Posts tagged ${tag}.`}>
<Section id="tag" eyebrow="Tag" index="#" title={`Posts tagged “${tag}”`}> <Section id="tag" eyebrow="Tag" index="#" title={`Posts tagged “${tag}”`}>
<p class="tag-page__back" data-reveal> <p class="tag-page__back" data-reveal>
<a class="btn" href="/blog">← All posts</a> <a class="btn" href="/blog/">← All posts</a>
</p> </p>
<PostList posts={posts} /> <PostList posts={posts} />
</Section> </Section>
+1 -1
View File
@@ -32,7 +32,7 @@ const featuredProjects = (await getCollection("projects", (p) => p.data.featured
{featuredProjects.map((entry) => <ProjectCard entry={entry} />)} {featuredProjects.map((entry) => <ProjectCard entry={entry} />)}
</div> </div>
<p class="projects__more" data-reveal> <p class="projects__more" data-reveal>
<a class="btn" href="/projects">All projects →</a> <a class="btn" href="/projects/">All projects →</a>
</p> </p>
</Section> </Section>
+2 -2
View File
@@ -14,10 +14,10 @@ const p = entry.data;
const { Content } = await render(entry); const { Content } = await render(entry);
--- ---
<Layout title={p.title} path={`/projects/${entry.id}`} description={p.summary}> <Layout title={p.title} path={`/projects/${entry.id}/`} description={p.summary}>
<article class="case"> <article class="case">
<div class="container case__inner"> <div class="container case__inner">
<a class="case__back mono" href="/projects">← All projects</a> <a class="case__back mono" href="/projects/">← All projects</a>
<header class="case__head" data-reveal> <header class="case__head" data-reveal>
<p class="eyebrow">Case study</p> <p class="eyebrow">Case study</p>