fix: use fileSlug instead of url to avoid circular dependency
The eleventyComputed permalink cannot reference page.url as it creates a circular dependency (url depends on permalink). Using fileSlug instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
layout: layouts/base.njk
|
||||
title: About
|
||||
eleventyComputed:
|
||||
permalink: "{% set aboutPageExists = false %}{% for page in collections.pages %}{% if page.url == '/about/' %}{% set aboutPageExists = true %}{% endif %}{% endfor %}{% if aboutPageExists %}false{% else %}/about/{% endif %}"
|
||||
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