This repository has been archived on 2026-05-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blowfish/layouts/shortcodes/article.html
T
2026-04-09 19:05:14 +04:00

18 lines
652 B
HTML

{{ $link := printf "%s%s" site.LanguagePrefix (.Get "link") }}
{{ $showSummary := .Get "showSummary" }}
{{ $compactSummary := .Get "compactSummary" | default false }}
{{ $target := .Page }}
{{ if ne $link .Page.RelPermalink }}
{{ $pages := slice }}
{{ range hugo.Sites }}
{{ $pages = $pages | append .Pages }}
{{ end }}
{{ $target = index (first 1 (where $pages "RelPermalink" $link)) 0 }}
{{ end }}
{{ if $target }}
<section class="space-y-10 w-full">
{{ $context := dict "target" $target "showSummary" $showSummary "compactSummary" $compactSummary }}
{{ partial "article-link/_shortcode.html" $context }}
</section>
{{ end }}