Merge branch 'main' into 40c3
This commit is contained in:
commit
c496f8bbfb
5 changed files with 46 additions and 0 deletions
|
Before Width: | Height: | Size: 3.8 MiB After Width: | Height: | Size: 3.8 MiB |
|
|
@ -8,4 +8,7 @@ map_39c3_title: "Karte der 39C3-Touren mit Wegen vom CCH (uMap)"
|
||||||
calendar_meeting_point: "Hackertours-Desk"
|
calendar_meeting_point: "Hackertours-Desk"
|
||||||
calendar_ics: "iCal Download"
|
calendar_ics: "iCal Download"
|
||||||
calendar_google: "Google Calendar"
|
calendar_google: "Google Calendar"
|
||||||
|
skip_to_content: "Zum Inhalt springen"
|
||||||
|
logo_alt: "Hamburg Hackertours – Startseite"
|
||||||
|
map_39c3_title: "Karte der 39C3-Touren mit Wegen vom CCH (uMap)"
|
||||||
schedule_soldout: "ausgebucht"
|
schedule_soldout: "ausgebucht"
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,7 @@ map_39c3_title: "Map of the 39C3 tours with routes from the CCH (uMap)"
|
||||||
calendar_meeting_point: "Hackertours Desk"
|
calendar_meeting_point: "Hackertours Desk"
|
||||||
calendar_ics: "iCal download"
|
calendar_ics: "iCal download"
|
||||||
calendar_google: "Google calendar"
|
calendar_google: "Google calendar"
|
||||||
|
skip_to_content: "Skip to content"
|
||||||
|
logo_alt: "Hamburg Hackertours – home page"
|
||||||
|
map_39c3_title: "Map of the 39C3 tours with routes from the CCH (uMap)"
|
||||||
schedule_soldout: "fully booked"
|
schedule_soldout: "fully booked"
|
||||||
|
|
|
||||||
40
layouts/_partials/head/extra.html
Normal file
40
layouts/_partials/head/extra.html
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
{{- /*
|
||||||
|
Open Graph image for link previews. The theme's head/meta.html writes og:image only for the
|
||||||
|
"image" param; without it, this uses the first image in the page's Markdown, scaled down to at
|
||||||
|
most 1200 pixels wide, with its alt text as og:image:alt.
|
||||||
|
*/ -}}
|
||||||
|
{{- if not ($.Param "image") -}}
|
||||||
|
{{- with findRESubmatch `!\[([^\]]*)\]\(\s*<?([^\s)>]+)` .RawContent 1 -}}
|
||||||
|
{{- $alt := index . 0 1 -}}
|
||||||
|
{{- $dest := index . 0 2 -}}
|
||||||
|
{{- $url := "" -}}
|
||||||
|
{{- $width := 0 -}}
|
||||||
|
{{- $height := 0 -}}
|
||||||
|
{{- $resource := false -}}
|
||||||
|
{{- if findRE `^https?://` $dest -}}
|
||||||
|
{{- $url = $dest -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $resource = or ($.Resources.Get (strings.TrimPrefix "./" $dest)) (resources.Get $dest) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- with $resource -}}
|
||||||
|
{{- $image := . -}}
|
||||||
|
{{- if and (eq .ResourceType "image") (ne .MediaType.SubType "svg") -}}
|
||||||
|
{{- if gt .Width 1200 }}{{ $image = .Resize "1200x" }}{{ end -}}
|
||||||
|
{{- $width = $image.Width -}}
|
||||||
|
{{- $height = $image.Height -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- $url = $image.Permalink -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- with $url }}
|
||||||
|
<meta property="og:image" content="{{ . }}">
|
||||||
|
{{- with $width }}
|
||||||
|
<meta property="og:image:width" content="{{ . }}">
|
||||||
|
<meta property="og:image:height" content="{{ $height }}">
|
||||||
|
{{- end }}
|
||||||
|
{{- with $alt }}
|
||||||
|
<meta property="og:image:alt" content="{{ . }}">
|
||||||
|
{{- end }}
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
Loading…
Reference in a new issue