mirror of
https://github.com/svemagie/blog-eleventy-indiekit.git
synced 2026-04-02 16:44:56 +02:00
fix: use 11tydata.js for conditional about page permalink
Using a JavaScript data file to return boolean false for permalink when about.md exists, instead of trying to compute it in Nunjucks which returns string "false" and causes errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
---
|
||||
layout: layouts/base.njk
|
||||
title: About
|
||||
eleventyComputed:
|
||||
permalink: "{% set aboutPageExists = false %}{% for page in collections.pages %}{% if page.fileSlug == 'about' %}{% set aboutPageExists = true %}{% endif %}{% endfor %}{% if aboutPageExists %}false{% else %}/about/{% endif %}"
|
||||
---
|
||||
<article class="h-card">
|
||||
<header class="mb-6 sm:mb-8 flex flex-col sm:flex-row gap-6 sm:gap-8 items-start">
|
||||
|
||||
Reference in New Issue
Block a user