mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 18:15:31 +00:00
BREAKING CHANGE Module paths moved to `github.com/HugoBlox/kit` with new names: - core `blox-tailwind` → `blox` - analytics → `analytics` - netlify → `integrations/netlify` - slides (reveal) → `slides` Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
23 lines
757 B
HTML
23 lines
757 B
HTML
{{ $show_backlinks := .Params.backlinks | default true }}
|
|
{{ if $show_backlinks }}
|
|
{{ $defer_globals := (dict "page" . )}}
|
|
{{ with (templates.Defer (dict "data" $defer_globals )) }}
|
|
{{ $backlinks := (site.Home.Store.Get "backlinks" | uniq) | default dict }}
|
|
{{ with (where $backlinks "links_to" .page.RelPermalink) }}
|
|
<div class="backlinks">
|
|
<div class="mb-1 font-semibold tracking-tight">
|
|
{{ (T "backlinks") | default "Backlinks" }}
|
|
</div>
|
|
<ul>
|
|
{{ range (sort . "page.date" "desc") }}
|
|
{{ $page := .page }}
|
|
<li>
|
|
<a href="{{ $page.relPermalink }}" class="backlink">{{ $page.linkTitle }}</a>
|
|
</li>
|
|
{{ end }}
|
|
</ul>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|