This commit is contained in:
Gabriel 2023-05-03 20:42:14 -04:00
parent 74d5fc2cbb
commit e357c1515b
4 changed files with 59 additions and 4 deletions

View file

@ -3,8 +3,7 @@
<img src='{{.Get 3}}'> <img src='{{.Get 3}}'>
{{end}} {{end}}
<div> <div>
<h3>{{ .Get 1 }}</h3> <h3>{{ .Get 1 }}</h3>
<p>{{.Get 2 }}</p> <p>{{.Get 2 }}</p>
</div> </div>
</a> </a>

View file

@ -0,0 +1,44 @@
# Shortcodes
My hugo shortcodes for all my themes
## Themes
- [Freedom](https://code.gabe.rocks/gabriel/freedom)
- [Valor](https://code.gabe.rocks/gabriel/valor)
### Audio
Embeds an audio player for an audio source
### Embed
Embeds an URL
### Gallery-(start/end)
Starts and closes a `div` element with the class `gallery`
### gif
A muted video with autoplay and no controls
### image
An image, optionally includes links and captions
### link-preview
A fancy preview for links
### pdf
Embeds a pdf
### recent-items
### relevant-items
### video
A video player with controls

View file

@ -0,0 +1,5 @@
<div class="gallery">
{{range first 3 .Site.RegularPages}}
{{partial "item" .}}
{{end}}
</div>

View file

@ -0,0 +1,7 @@
<div class="gallery">
{{ $tag := .Get 0 }}
{{range .Site.RegularPages.RelatedTo (keyVals "tags" $tag) }}
{{partial "item" .}}
{{end}}
</div>