Use external link policy for a.html

master
Will Faught 2 years ago
parent a93d52fd73
commit 4d2292df74

@ -3,6 +3,9 @@
{{ $class := $params.class }}
{{ $content := $params.content }}
{{ $href := $params.href }}
{{ $page := $params.page }}
{{ $style := $params.style }}
<a {{ with $class }} class="{{ . }}" {{ end }} {{ with $href }} href="{{ . | safeURL }}" {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }}>{{ $content }}</a>
{{ $target := partial "paige/target.html" (dict "page" $page "url" $href) }}
<a {{ with $class }} class="{{ . }}" {{ end }} {{ with $href }} href="{{ . | safeURL }}" {{ end }} {{ with $style }} style="{{ . | safeCSS }}" {{ end }} {{ with $target }} target="{{ . }}" {{ end }}>{{ $content }}</a>

@ -283,9 +283,9 @@
{{ end }}
{{ $resource = $resource | fingerprint }}
{{ $content = partial "paige/a.html" (dict "content" $content "href" $resource.RelPermalink) }}
{{ $content = partial "paige/a.html" (dict "content" $content "href" $resource.RelPermalink "page" $page) }}
{{ else if $link }}
{{ $content = partial "paige/a.html" (dict "content" $content "href" $link) }}
{{ $content = partial "paige/a.html" (dict "content" $content "href" $link "page" $page) }}
{{ end }}
<span class="paige-image">{{ $content }}</span>

Loading…
Cancel
Save