diff options
| author | Eltrac <hi@guhub.cn> | 2025-07-17 10:21:51 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-07-17 10:21:51 +0800 |
| commit | 0e1ff20e27a5fc427c74717d16bebbe7d774479d (patch) | |
| tree | 8520e72118ee8a57b149813290ac29ba795800f7 /layouts/_shortcodes | |
| parent | 605463f98caeb2ea7a82b207aa5389292b5d5323 (diff) | |
refactor: remove img shortcode and enable markdown attribuets
Former-commit-id: b01c58d9bb80f117d1181eb1d3b0b126ed0e7b44
Diffstat (limited to 'layouts/_shortcodes')
| -rw-r--r-- | layouts/_shortcodes/img.html | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/layouts/_shortcodes/img.html b/layouts/_shortcodes/img.html deleted file mode 100644 index 01d0684b..00000000 --- a/layouts/_shortcodes/img.html +++ /dev/null @@ -1,25 +0,0 @@ -<!-- image --> -<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}> -{{ with .Get "link" }}<a href="{{ . }}">{{ end }} - <a href="{{ .Get "src" }}" data-fancybox {{ if isset .Params "title" }} data-caption="{{.Get "title" }}" {{ end }}> - <img - class="lazy" - loading="lazy" - src="{{ .Get "src" }}" - {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} - /> - </a> - {{ if .Get "link" }}</a>{{ end }} - {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }} - <figcaption>{{ if isset .Params "title" }} - <h4>{{ .Get "title" | markdownify }}</h4>{{ end }} - {{ if or (.Get "caption") (.Get "attr") }}<p> - {{ .Get "caption" }} - {{ with .Get "attrlink" }}<a href="{{ . }}"> {{ end }} - {{ .Get "attr" }} - {{ if .Get "attrlink" }}</a> {{ end }} - </p> {{ end }} - </figcaption> -{{ end }} -</figure> -<!-- image --> |
