PageLink-Card

PageLink-Card

layouts/shortcodes/pagelink-card.html
{{- $path := .Get 0 -}}
{{- $page := site.GetPage $path -}}
{{- if $page -}}
{{ $card := partial "shortcodes/card.html" (dict "link" $page.RelPermalink "title" $page.Title) }}
{{ partial "shortcodes/cards.html" (dict "cols" 1 "content" (safeHTML $card)) }}
{{- end -}}

Usage

{{< pagelink-card "_index.md" >}}