Vorlage fuer eigene Ableger-Installationen: Website + CMS-Code
Bereinigt von Pilot-Spezifika (echte Inhalte, Erzbistum-Hamburg-Bezuege, Domain-Werte) - install.env und hugo.toml [params] mit generischen Platzhaltern. docs/ komplett entfernt: Konzept, Manifest, Installations- anleitungen leben jetzt auf der Projekt-Website statt redundant im Repo, README verweist dorthin. Decap-CMS-Version von einer floatenden ^3.0.0 auf ein festes 3.15.1 gepinnt.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
{{/* We resolve image paths in variant content () via the
|
||||
page resources of the page the content belongs to (the variant) - not
|
||||
the page that embeds .Content. With only one variant, the method page
|
||||
(hugo/layouts/_default/single.html) embeds this content directly; a
|
||||
raw relative path would resolve against the wrong URL there (the file
|
||||
lives in the variant's bundle folder, not the method's). An absolute
|
||||
permalink makes the embed location-independent. */}}
|
||||
{{- $resource := "" }}
|
||||
{{- if not (urls.Parse .Destination).IsAbs }}
|
||||
{{- with .Page.Resources.GetMatch .Destination }}
|
||||
{{- $resource = . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $resource }}
|
||||
<img src="{{ $resource.Permalink }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }}>
|
||||
{{- else }}
|
||||
<img src="{{ .Destination }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }}>
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user