diff --git a/layouts/partials/open_graph_meta.html b/layouts/partials/open_graph_meta.html new file mode 100644 index 0000000..ebdae49 --- /dev/null +++ b/layouts/partials/open_graph_meta.html @@ -0,0 +1,66 @@ + + +{{ if .Title }} + +{{ else }} + +{{ end }} + + + + + +{{ with .Params.images }} + {{ range first 6 . }} + + {{ end }} +{{ end }} + +{{ with .Params.audio }} + +{{ end }} + +{{ with .Params.videos }} + {{ range first 1 . }} + + {{ end }} +{{ end }} + +{{ if .IsPage }} + {{ if not .PublishDate.IsZero }} + + {{ else if not .Date.IsZero }} + + {{ end }} + + {{ if not .Lastmod.IsZero }} + + {{ end }} +{{ else }} + {{ if not .Date.IsZero }} + + {{ end }} +{{ end }} + +{{ with .Site.Params.title }} + +{{ end }} + +{{ if .IsPage }} + {{ range .Site.Authors }} + {{ with .Social.facebook }} + + {{ end }} + + {{ with .Site.Social.facebook }} + + {{ end }} + + + + {{ with .Params.tags }} + {{ range first 6 . }} + + {{ end }} + {{ end }} +{{ end }} diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..29a378a --- /dev/null +++ b/plugin.json @@ -0,0 +1,8 @@ +{ + "version": "1.0", + "title": "Open Graph Cards", + "description": "This plugin adds Open Graph meta tags to create social media and iMessage previews for posts.", + "includes": [ + "open_graph_meta.html" + ] +} \ No newline at end of file