浏览代码

Add OpenGraph image tag and Twitter cards #8 #9

master
Adrian Short 6 年前
父节点
当前提交
2905b27047
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      layouts/partials/header.html

+ 6
- 1
layouts/partials/header.html 查看文件

@@ -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>

正在加载...
取消
保存