mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 22:15:11 +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.
15 lines
625 B
JSON
15 lines
625 B
JSON
{{- $url_struct := urls.Parse .Destination -}}
|
|
{{/* Ignore anchor links to other sections of the same page. */}}
|
|
{{- if not (or $url_struct.IsAbs (strings.HasPrefix $url_struct.String "#")) }}
|
|
{{- $page_path := strings.TrimPrefix "./" $url_struct.Path -}}
|
|
{{- with .PageInner.GetPage $page_path }}
|
|
{{- $page := dict
|
|
"date" ($.Page.Date.UTC.Format "2006-01-02T15:04:05-07:00")
|
|
"linkTitle" $.Page.LinkTitle
|
|
"relPermalink" $.Page.RelPermalink
|
|
}}
|
|
{{- $backlink := dict "page" $page "links_to" .RelPermalink }}
|
|
{{- site.Home.Store.Add "backlinks" (slice $backlink) }}
|
|
{{- end }}
|
|
{{- end }}
|