Commit 6fc3c495 authored by Laura Kalbag's avatar Laura Kalbag

Start adding meta info for social platform links

parent af4724a3
......@@ -3,4 +3,8 @@ languageCode = "en-us"
title = "Small Technology Foundation"
theme = "small-tech"
[permalinks]
pages = "/:slug/"
\ No newline at end of file
pages = "/:slug/"
[params]
image = "site-feature.png" # Default other stuff image for site
publisherLogo = "site-feature.png" # Default other stuff image for site
publisher = "Small Technology Foundation"
\ No newline at end of file
......@@ -12,6 +12,10 @@
{{/* <meta name="description" content="{{ .Summary }}"> */}}
<link href='{{ "style.css" | relURL }}' rel='stylesheet' type="text/css" />
{{- partial "meta-twitter.html" . -}}
{{- partial "meta-identities.html" . }}
{{- partial "meta-schema.html" . -}}
</head>
......
<link rel="me" href="https://mastodon.ar.al/@aral" />
<link rel="me" href="https://mastodon.laurakalbag.com/@laura" />
<link rel="me" href="https://twitter.com/aral" />
<link rel="me" href="https://twitter.com/LauraKalbag" />
\ No newline at end of file
<!-- From Indiego partials/micro-schema.html https://github.com/growdigital/indiego/blob/master/themes/indiegomin/layouts/partials/micro-schema.html -->
<!-- Schema.org markup -->
<meta itemprop="headline" content="{{ .Title }}">
<meta itemprop="description" content="{{ .Summary }}">
<meta itemprop="image" content="{{ .Site.BaseURL }}{{ .Params.image }}">
<meta itemprop="image" content="{{ .Site.BaseURL }}{{ .Site.Params.publisherLogo }}">
{{ if eq .Type "news" }}
<meta itemprop="author" content="{{ .Params.author }}">
{{ else if eq .Type "videos" }}
<meta itemprop="author" content="{{ .Params.speaker }}">
{{ else }}
<meta itemprop="author" content="{{ .Site.Params.publisher }}">
{{ end }}
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="{{ .Site.BaseURL }}/{{ .Site.Params.publisherLogo }}">
<meta itemprop="width" content="{{ .Site.Params.publisherLogoWidth }}">
<meta itemprop="height" content="{{ .Site.Params.publisherLogoHeight }}">
</div>
<meta itemprop="name" content="{{ .Site.Params.publisher }}">
</div>
\ No newline at end of file
<!-- From Indiego partials/micro-twitog.html https://github.com/growdigital/indiego/blob/master/themes/indiegomin/layouts/partials/micro-twitog.html -->
<!-- Twitter -->
<meta name="twitter:site" content="@{{ .Site.Params.twitter }}">
{{ if eq .Type "status" }}
<meta name="twitter:title" content="{{ .Date.Format "Monday, 2 January 2006" }}">
<meta name="twitter:description" content="{{ .Summary }}">
{{ else }}
<meta name="twitter:title" content="{{ .Title }}">
<meta name="twitter:description" content="{{ .Summary }}">
{{ end }}
{{ if .Params.Image }}
<!-- Twitter Summary Card with Large Image data -->
<!-- Aspect ratio 2:1, minimum dimension 300x157 -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ .Site.BaseURL }}{{ .Params.Image }}">
<meta name="twitter:image:alt" content="{{ .Params.imagealt }}">
{{ else if eq .Type "photos" }}
{{ with .Resources }}
{{ with .GetMatch "{*.*,*.jpg,*.png,*.jpeg}" }}{{ $photo := .Resize "600x314" }}
{{ with $photo }}
<!-- Twitter Summary Card with Large Image data -->
<!-- Aspect ratio 2:1, minimum dimension 300x157 -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="{{ .Permalink }}">
<meta name="twitter:image:alt" content="{{ .Params.imagealt }}">
{{ end }}
{{ end }}{{ end }}
{{ else }}
<!-- Twitter Summary Card -->
<!-- Aspect ratio 1:1, minimum dimension 144x144 -->
<!-- Defaulting to publisher logo -->
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="{{ .Site.BaseURL }}/{{ .Site.Params.publisherLogo }}">
<meta name="twitter:image:alt" content="{{ .Site.Params.publisher }} logo">
{{ end }}
<!-- Open Graph data -->
<meta property="fb:app_id" content="{{ .Site.Params.fbapp_id }}">
<meta property="og:locale" content="{{ .Site.Language.Lang }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
<meta property="og:type" content="article">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:url" content="{{ .Permalink }}">
{{ if .Params.Description }}
<meta property="og:description" content="{{ .Params.Description }}">
{{ else }}
<meta property="og:description" content="{{ .Summary }}">
{{ end }}
{{ if .Params.Image }}
<!-- If image present -->
<meta property="og:image" content="{{ .Site.BaseURL }}{{ .Params.Image }}">
<meta property="og:image:alt" content="{{ .Params.imagealt }}">
<!-- width & height to ensure shares of new URLs include image -->
<meta property="og:image:width" content="624">
<meta property="og:image:height" content="352">
<!-- If no image, show logo. Make it square, 200px minimum -->
<meta property="og:image" content="{{ .Site.BaseURL }}/{{ .Site.Params.publisherLogo }}">
<meta property="og:image:width" content="{{ .Site.Params.publisherLogoWidth }}">
<meta property="og:image:height" content="{{ .Site.Params.publisherLogoHeight }}">
{{ end }}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment