{{ $link := .Get 0 }} {{ if not $link }} {{ errorf "No page title specified" }} {{ end }} {{ $hash := .Get 1 }} {{/* Try both with and without leading slash for compatibility */}} {{ $page := "" }} {{ if hasPrefix $link "/" }} {{ $page = site.GetPage (strings.TrimPrefix "/" $link) }} {{ else }} {{ $page = site.GetPage $link }} {{ end }} {{ if not $page }} {{ errorf "Error in jump shortcode at %s: No page found at %s. Please ensure the page exists and the path is correct." $.Page.File.Path $link }} {{ end }}