Add hasBreadcrumbs variable to allow non-article content to add breadcrumbs
This commit is contained in:
parent
baf61d74ae
commit
15f074abb6
|
@ -1,5 +1,5 @@
|
||||||
<header class="main__header">
|
<header class="main__header">
|
||||||
{% if isArticle %}
|
{% if isArticle or hasBreadcrumbs %}
|
||||||
<ul class="breadcrumbs">
|
<ul class="breadcrumbs">
|
||||||
{% set breadcrumbNavPages = collections.all | eleventyNavigationBreadcrumb(articleTitle) %}
|
{% set breadcrumbNavPages = collections.all | eleventyNavigationBreadcrumb(articleTitle) %}
|
||||||
{%- for entry in breadcrumbNavPages %}
|
{%- for entry in breadcrumbNavPages %}
|
||||||
|
@ -9,7 +9,9 @@
|
||||||
➔
|
➔
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if isArticle %}
|
||||||
<h1>{{ articleTitle }}</h1>
|
<h1>{{ articleTitle }}</h1>
|
||||||
<div class="article__info">
|
<div class="article__info">
|
||||||
<p>Posted on {{ date | niceDate }} by {{ sitemeta.siteAuthor.name }}
|
<p>Posted on {{ date | niceDate }} by {{ sitemeta.siteAuthor.name }}
|
||||||
|
|
Loading…
Reference in New Issue