commit 86a974c811912c109082152b2990c06d181cf9ff parent e673753a7fba027a1b63a086b0f296228cfb3ec3 Author: Pollux <pollux@pollux.codes> Date: Thu, 24 Jul 2025 02:41:40 -0500 feat: Add indicator to external links Signed-off-by: Pollux <pollux@pollux.codes> Diffstat:
A | layouts/_default/_markup/render-link.html | | | 1 | + |
M | layouts/partials/footer.html | | | 5 | +++-- |
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html @@ -0,0 +1 @@ +<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}{{ if strings.HasPrefix .Destination "http" }}↗️{{ end }}</a>{{- print "" -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html @@ -1,8 +1,9 @@ <footer> <hr> - <a href="#">Back to top</a><br>Design inspired by the <a href="https://bestmotherfucking.website">best motherfucking website</a>.<br> + <a href="#">Back to top</a><br> + Design inspired by the <a href="https://bestmotherfucking.website">best motherfucking website↗️</a>.<br> This website was built using Hugo. The source is available <a href="/git/pollux.codes/">here</a>. - <p style="margin: 0" xmlns:cc="http://creativecommons.org/ns#" >This work is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY-SA 4.0</a>.</p> + <p style="margin: 0" xmlns:cc="http://creativecommons.org/ns#" >This work is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC BY-SA 4.0↗️</a>.</p> <div style="max-width: 528px; margin:0em auto"> {{ range (index .Site.Params "buttons") -}} {{- $image := resources.Get .file -}}