mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: image shortcode/plugin lose the support for svg type files (#210)
This commit is contained in:
@@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
- :truck: Feat: migrate parameter `params.autoBookmark` to `params.page.autoBookmark` ([#55](https://github.com/hugo-fixit/FixIt/issues/55))
|
||||
- :bug: Fix: remove the leading and trailing whitespace of the code string ([#205](https://github.com/hugo-fixit/FixIt/issues/205))
|
||||
- :bug: Fix: image shortcode/plugin lose the support for svg type files ([#210](https://github.com/hugo-fixit/FixIt/issues/210))
|
||||
- **Full Changelog:** @Lruihao [`v0.2.16...v0.2.17`](https://github.com/hugo-fixit/FixIt/compare/v0.2.16...v0.2.17)
|
||||
|
||||
## v0.2.16 [2022.9.24]
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
{{- $height := .Height -}}
|
||||
{{- with dict "Path" $src "Resources" .Resources | partial "function/resource.html" -}}
|
||||
{{- $src = .RelPermalink -}}
|
||||
{{- $width = $width | default .Width -}}
|
||||
{{- $height = $height | default .Height -}}
|
||||
{{- /* Resources can not get width and height of image for svg type */ -}}
|
||||
{{- if ne .MediaType.SubType "svg" -}}
|
||||
{{- $width = $width | default .Width -}}
|
||||
{{- $height = $height | default .Height -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $style := "" -}}
|
||||
|
||||
Reference in New Issue
Block a user