This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{/* layouts/partials/seo-visual-art-schema.html */}} | |
| <script type="application/ld+json"> | |
| { | |
| "@context" : "http://schema.org", | |
| "@type" : "VisualArtwork", | |
| "name" : "{{ .Title }}", | |
| "headline" : "{{ .Title }}",{{/* Include the whole content but, using funky regex, do case insensitive replacement of redundant appearances of (near) title */}} | |
| "description" : "{{ replaceRE (printf "(?i) %s " .Title ) " " ( htmlUnescape ( delimit .PlainWords " ") | plainify ) }}", | |
| "material" : "fabric", | |
| "artMedium": "fabric", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{/* Adapted from https://gist.github.com/randallmlough/98c9c949b25f2a41259029e03dd037f3 */}} | |
| {{/* trim leading slash left over from old references */}} | |
| {{- $image := (path.Join "images" (.Get "src")) -}} | |
| {{- $media := (.Site.GetPage "page" "media").Resources -}} | |
| {{- $original := index ($media.Match (printf "%s" $image)) 0 -}} | |
| {{- $class := .Get "class" -}} | |
| {{- $link := .Get "link" -}} | |
| {{- $caption := .Get "caption" -}} | |
| {{- $title := .Get "title" -}} | |
| {{- $alt := .Get "alt" -}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{- $image := replaceRE "^https?://[^/]+/(.*)" "$1" ($.Scratch.Get "image") -}} | |
| {{- $media := (.Site.GetPage "page" "media").Resources -}} | |
| {{- $original := index ($media.Match (printf "%s" $image)) 0 -}} | |
| {{- $width := $original.Width -}} | |
| {{- $intWidth := int $width -}} | |
| {{- $sizes := (sort ($.Param "sizes") "value" ) -}} | |
| {{- $options := $.Param "header_options" -}} | |
| {{- $first := index (first 1 $sizes) 0 -}} | |
| {{- $last := index (last 1 $sizes) 0 -}} | |
| {{- $debug := false -}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {{/* Adapted from https://gist.github.com/randallmlough/98c9c949b25f2a41259029e03dd037f3 */}} | |
| {{- $image := replaceRE "^https?://[^/]+/(.*)" "$1" ($.Scratch.Get "image") -}} | |
| {{- $media := (.Site.GetPage "page" "media").Resources -}} | |
| {{- $original := index ($media.Match (printf "%s" $image)) 0 -}} | |
| {{- $width := $original.Width -}} | |
| {{- $intWidth := int $width -}} | |
| {{- $sizes := $.Param "sizes" -}} | |
| {{- $options := $.Param "options" -}} | |
| {{- $usePicture := false -}}{{/* true: Use picture element with source definitions */}} | |
| {{- $multipleSizes := true -}}{{/* true: Provide multiple img sizes attribute */}} |