aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/single.embed.html
blob: 73a3add4e27eae0c598f83f95418ce9d088d7b71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{{- $pageContext := . -}}
{{- $format := "embed.html" -}}

{{- $page := print "public/" (strings.TrimPrefix
      $pageContext.Page.Site.BaseURL
      $pageContext.Page.Permalink
    ) $format
-}}

{{- $modified := partial "function-page-modified.html"
  (dict
    "Context" $pageContext
    "Format"  $format
  )
-}}

{{- with $embed := resources.Get $page -}}
  {{- if (in $embed.Content "/data/media/404.png") -}}
   {{- $modified = true -}}
  {{- end -}}
{{- end -}}

{{- if $modified -}}
  {{- partial "head-embed.html" . -}}
  {{- .Render "summary" -}}
{{- end -}}