mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 11:51:21 -04:00
feat: display author avatar images in blog post (#204)
* feat: support displaying author images in blog post * chore: fix typo * chore: run build:css * refactor: support both plain author list * chore: run build:css * chore: add support for local avatar images * chore: update css classes
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
{{- $alt := .PlainText | safeHTML -}}
|
||||
{{- $lazyLoading := .Page.Site.Params.enableImagelazyLoading | default true -}}
|
||||
{{- $lazyLoading := .Page.Site.Params.enableImageLazyLoading | default true -}}
|
||||
{{- $dest := .Destination -}}
|
||||
|
||||
{{- $isRemote := not (urls.Parse $dest).Scheme -}}
|
||||
{{- $isLocal := not (urls.Parse $dest).Scheme -}}
|
||||
{{- $isPage := and (eq .Page.Kind "page") (not .Page.BundleType) -}}
|
||||
{{- $startsWithSlash := hasPrefix $dest "/" -}}
|
||||
{{- $startsWithRelative := hasPrefix $dest "../" -}}
|
||||
|
||||
{{- if and $dest $isRemote -}}
|
||||
{{- if and $dest $isLocal -}}
|
||||
{{- if $startsWithSlash -}}
|
||||
{{/* Images under static directory */}}
|
||||
{{- $dest = (relURL (strings.TrimPrefix "/" $dest)) -}}
|
||||
|
Reference in New Issue
Block a user