mirror of
https://github.com/adityatelange/hugo-PaperMod.git
synced 2025-05-31 06:48:24 -04:00
Add inTextImg shortcode
Allows adding in-line-text images usage in page.md => This image is inlined {{< inTextImg.html url="image.png" >}} here. optional args: - height - alt
This commit is contained in:
parent
5032b2c4f1
commit
e3c30b4e41
2 changed files with 10 additions and 0 deletions
5
layouts/shortcodes/inTextImg.html
Normal file
5
layouts/shortcodes/inTextImg.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- $Img := (.Get "url") }}
|
||||
{{- $height := (.Get "height") }}
|
||||
{{- $alt := (.Get "alt") }}
|
||||
|
||||
<img class="in-text" height="{{ $height | default `15px` }}" src="{{$Img}}" alt="{{$alt}}">
|
Loading…
Add table
Add a link
Reference in a new issue