mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-03-20 16:15:09 +00:00
link: check fragments on same page #1060
This commit is contained in:
parent
b89d1e3fb6
commit
bc0011fc05
2 changed files with 8 additions and 2 deletions
|
@ -1,7 +1,13 @@
|
|||
{{- $u := urls.Parse .url }}
|
||||
{{- $hideFilepath := .hideFilepath | default false }}
|
||||
{{- $type := printf "%T" .linkObject }}
|
||||
{{- $isPage := eq $type "*hugolib.pageState" }}
|
||||
{{- $isPage := or
|
||||
(eq $type "*hugolib.pageForRenderHooks")
|
||||
(eq $type "*hugolib.pageForShortcode")
|
||||
(eq $type "*hugolib.pageState")
|
||||
(eq $type "*hugolib.pageWithOrdinal")
|
||||
(eq $type "*hugolib.pageWithWeight0")
|
||||
}}
|
||||
{{- $href := partial "permalink.gotmpl" (dict "to" .linkObject) }}
|
||||
{{- if $isPage }}
|
||||
{{- $format := $u.Query.Get "format" }}
|
||||
|
|
|
@ -1 +1 @@
|
|||
7.5.0+566c17d000a04bc3d189525bfb8d2ea06dcfe71d
|
||||
7.5.0+b89d1e3fb63c72c28f83bda3ef08bdca7723066c
|
Loading…
Add table
Reference in a new issue