Allow non-article pages to add breadcrumbs

This commit is contained in:
Helen Chong 2024-04-19 23:50:12 +08:00
parent f134f854f0
commit c9d530522a
1 changed files with 13 additions and 12 deletions

View File

@ -1,5 +1,4 @@
<header class="main__header">
{% if isArticle %}
{% if eleventyNavigation %}
<ul class="breadcrumbs">
{% set breadcrumbNavPages = collections.all | eleventyNavigationBreadcrumb(articleTitle) %}
@ -12,6 +11,8 @@
</ul>
{% endif %}
{% if isArticle %}
<h1>{{ articleTitle }}</h1>
<div class="article__info">
<p>Posted on {{ date | niceDate }} by {{ sitemeta.siteAuthor.name }}