fix(shortcodes): allow parent bundle resource lookup on fig-img
All checks were successful
Deploy workflow / deploy (push) Successful in 32s
All checks were successful
Deploy workflow / deploy (push) Successful in 32s
This commit is contained in:
parent
eabd8fbe70
commit
421f2fa7b0
4 changed files with 17 additions and 4 deletions
|
@ -64,6 +64,14 @@ img {
|
|||
object-fit: contain;
|
||||
}
|
||||
|
||||
// Margin management
|
||||
.no-margin {
|
||||
margin-top: 0 !important;
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/**
|
||||
General Layout
|
||||
**/
|
||||
|
|
Before Width: | Height: | Size: 358 KiB After Width: | Height: | Size: 358 KiB |
|
@ -10,13 +10,12 @@ En 2023, une bière exclusive a été brassée par la Brasserie des Cottereaux e
|
|||
|
||||
{{<fig-img
|
||||
single=true
|
||||
src="imgs/biere-majestueuse.jpg"
|
||||
src="images/biere_la_majestueuse.jpg"
|
||||
options="400x600"
|
||||
caption="Bière la Majestueuse"
|
||||
class="no-margin"
|
||||
>}}
|
||||
|
||||
![biere](/biere-majestueuse.jpg)
|
||||
|
||||
## Miel
|
||||
|
||||
À l’été 2024, 12 ruches ont été installées sur le coteau de la chapelle par l’apiculteur Samuel Fedorawiez. Le premier miel est attendu pour le printemps 2025, et une partie des ventes contribuera directement au financement de l’association.
|
|
@ -14,7 +14,13 @@
|
|||
{{ if hasPrefix (.Get "src") "https://" }}
|
||||
{{ $permalink = .Get "src" }}
|
||||
{{ else }}
|
||||
{{ $permalink = ((.Page.Resources.GetMatch (.Get "src")).Fill $options).Permalink }}
|
||||
{{ $resource := .Page.Resources.GetMatch (.Get "src") }}
|
||||
{{ if not $resource }}
|
||||
{{ $resource = .Page.Parent.Resources.GetMatch (.Get "src") }}
|
||||
{{- end -}}
|
||||
{{ if $resource }}
|
||||
{{ $permalink = ($resource.Fill $options).Permalink }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
<img src="{{ $permalink }}"
|
||||
|
|
Loading…
Reference in a new issue