From 44bfa6de9e4f829fcda5b325ad5ec9bfdba59378 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Mon, 2 Feb 2026 13:08:42 +0100 Subject: [PATCH] fix: disable about.njk completely with permalink: false Set permalink: false directly in frontmatter to ensure the template never renders. Users should create their own about page via post-type-page plugin. Removed about.11tydata.js as it's no longer needed. Co-Authored-By: Claude Opus 4.5 --- about.11tydata.js | 21 --------------------- about.njk | 2 ++ 2 files changed, 2 insertions(+), 21 deletions(-) delete mode 100644 about.11tydata.js diff --git a/about.11tydata.js b/about.11tydata.js deleted file mode 100644 index 64bf2fb..0000000 --- a/about.11tydata.js +++ /dev/null @@ -1,21 +0,0 @@ -// Template data file for about.njk -// Dynamically sets permalink based on whether about.md exists in content/pages/ -import { existsSync } from "fs"; -import { resolve, dirname } from "path"; -import { fileURLToPath } from "url"; - -const __dirname = dirname(fileURLToPath(import.meta.url)); - -export default function() { - // Check for about.md in content/pages/ directory - const aboutPath = resolve(__dirname, "content/pages/about.md"); - const aboutExists = existsSync(aboutPath); - - return { - // If about.md exists, disable this template's permalink - // If not, use /about/ as the permalink - permalink: aboutExists ? false : "/about/", - // Also exclude from collections if about.md exists - eleventyExcludeFromCollections: aboutExists - }; -} diff --git a/about.njk b/about.njk index de50fdd..8c3a837 100644 --- a/about.njk +++ b/about.njk @@ -1,6 +1,8 @@ --- layout: layouts/base.njk title: About +permalink: false +eleventyExcludeFromCollections: true ---