Add Docker Build Support

Blog posts with 'draft: true' in the frontmatter are excluded from the production artifact
--no-cache docker builds ensure fresh database build each time. Caching isn't needed do to small size anyway
This commit is contained in:
2026-04-15 12:25:20 -07:00
parent 603687c46b
commit b96f7ed3f0
6 changed files with 165 additions and 4 deletions

View File

@@ -14,6 +14,11 @@ import { dbConnection } from "../src/db";
const {data, content } = matter(await Bun.file(`./content/${file}`).text());
const route = `/${file.replace(/\.md$/, "")}`;
// Omit draft blog posts from database initialization in production
if (process.env.NODE_ENV === 'build' && data.draft) {
continue;
}
// Remove the title from content if it matches the frontmatter title to avoid duplicate H1s
let processedContent = content;
if (data.title) {