Hello.
This is possibly a super basic question, but sadly, I just stumbled upon it. I just wanted to know what ‘kind’ of a page is one with custom layout.
Basically, I have a contact page set-up like this: contact.md
in my content
folder with the frontmatter consisting of layout: contact
. Then, I created a contact.html
inside layouts/page/
.
I have a breadcrumb navigation on all my pages which is rendered conditionally. I have it set-up for {{- if .IsSection -}}
, {{- else if eq .Kind "term" -}}
and {{- else if .IsPage -}}
. The contact page seems to use the final condition, but that adds an empty <li>
to my breadcrumb because that condition is supposed to render the section of the page which is none for the contact page.
This is my final condition:
{{- else if .IsPage -}}
<li>
<a href = "/{{- .Section -}}/">
{{- humanize .Section -}}
</a>
</li>
<li>
<span uk-tooltip = "You're here">
{{- .Title -}}
</span>
</li>
{{- end -}}
So, for the contact page, I want to directly skip to the {{- .Title -}}
. How can I distinguish pages from my regular markdown content pages?