diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index 236b520c..b37f4bda 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -2,7 +2,14 @@ {{ $isExternal := (strings.HasPrefix .Destination "http") }} {{- if (not (or $isExternal (strings.HasPrefix .Destination "#"))) }} {{ $style := "" }} - {{ with $.PageInner.GetPage (index (strings.Split .Destination "#") 0) }} + {{ $desiredPage := (index (strings.Split .Destination "#") 0) }} + {{ with $.PageInner.GetPage $desiredPage }} + + {{ with .File }} + {{ if (ne .Path (print $desiredPage "." .Ext)) }} + {{ $style = "color:#ba0000" }} + {{ end }} + {{ end }} {{ else }} {{ $style = "color:#ba0000" }} {{ end }}