Browse Source

Add OpenGraph image tag and Twitter cards #8 #9

master
Adrian Short 7 years ago
parent
commit
2905b27047
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      layouts/partials/header.html

+ 6
- 1
layouts/partials/header.html View File

@@ -1,13 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<title>{{ partial "data/title" . }}</title>
<title>{{- partial "data/title" . -}}</title>
{{ .Hugo.Generator }}
{{ "<!-- Tumble theme for Hugo: https://github.com/adrianshort/tumble -->" | safeHTML }}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ relURL "/css/main.css" }}">
<link rel="alternate" type="application/rss+xml" title="{{ partial "data/title" . }}"
href="{{ .RSSLink }}">
{{- template "_internal/opengraph.html" . -}}
{{ with .Params.image_filename }}
<meta name="og:image" content="{{ "/images/" | absURL }}{{ .}}">
{{ end }}
{{- template "_internal/twitter_cards.html" -}}
</head>
<body>
<h1 id="site-title"><a href="{{ relURL "/" }}">{{ .Site.Title }}</a></h1>

Loading…
Cancel
Save