Skip to content

Commit

Permalink
fix: navigate to external post directly when clicking the featured im…
Browse files Browse the repository at this point in the history
…age (#764)
  • Loading branch information
razonyang committed Apr 15, 2024
1 parent 68a649c commit f68544a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion layouts/partials/hb/modules/blog/post/card-img.html
@@ -1,7 +1,14 @@
{{- $page := . }}
{{- $url := .RelPermalink }}
{{- $external := false }}
{{- with .Params.external_url }}
{{- $url = . }}
{{- $external = true }}
{{- end }}
<a
class="card-img-top overflow-hidden border border-secondary-subtle text-body text-decoration-none mt-2"
href="{{ .RelPermalink }}">
{{ if $external }}target="_blank" rel="external"{{ end }}
href="{{ $url }}">
{{- $img := "" }}
{{- with .Params.images }}
{{- $img = index . 0 }}
Expand Down

0 comments on commit f68544a

Please sign in to comment.