Skip to content

Commit f90eeef

Browse files
committed
fix twitter image missing
1 parent b91be0f commit f90eeef

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

content/dev/guide-to-serverless/index.zh-cn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tags: ["AWS", "Lambda", "Serverless", "Terraform", "Infrastructure as code", "
66
keywords: ""
77
description: "本文描述了笔者开发一个基于 AWS Serverless 技术的应用的全过程。"
88
isCJKLanguage: true
9+
og_image: "https://img.bmpi.dev/48504c01-c2d0-e05a-1eda-d82b88f6496d.png"
910
---
1011

1112
## 背景

content/dev/what-is-seo/index.zh-cn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ categories: [
1010
]
1111
series: ["SEO实践日志"]
1212
isCJKLanguage: true
13+
og_image: "https://img.bmpi.dev/227e91cc-a2a8-942e-19fe-8246d9a7abbd.png"
1314
---
1415

1516
![](https://img.bmpi.dev/227e91cc-a2a8-942e-19fe-8246d9a7abbd.png)

content/self/build-personal-knowledge-system/index.zh-cn.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ keywords: "知识管理、知识体系、知识系统、终身学习、自我管
77
description: "如何建立个人终身学习知识体系?如何自我管理?如何自我提升?本文分享我的终身学习知识体系建立过程,包括如何收集高质量信息、如何设定个人中长期目标及个人愿景、如何内化知识、如何整理笔记、如何管理时间、如何系统阅读、如何通过写作做知识输出建立个人品牌、如何通过个人项目应用所学知识。"
88
series: ["自我提升"]
99
isCJKLanguage: true
10+
og_image: "https://img.bmpi.dev/bf1093ef-68c2-c92a-0de5-a08decb02b31.png"
1011
---
1112

1213
ToC

themes/hugo-coder/layouts/_default/baseof.html

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,21 @@
1919
<meta name="keywords" content="{{ . }}">{{ end }}
2020
{{ end }}
2121

22-
{{ template "_internal/twitter_cards.html" . }}
23-
{{ template "_internal/opengraph.html" . }}
22+
<!-- Twitter Card -->
23+
<meta name="twitter:card" content="summary_large_image"/>
24+
<meta name="twitter:site" content="@BMPI11">
25+
<meta name="twitter:creator" content="@madawei2699">
26+
<meta name="twitter:title" content="{{ .Title }}"/>
27+
<meta name="twitter:description" content="{{ .Description }}"/>
28+
{{ if .Params.og_image }}
29+
<meta property="twitter:image" content="{{ .Params.og_image }}" />
30+
{{ else }}
31+
{{ with .Site.Params.og_image }}
32+
<meta name="twitter:image" content="{{ . }}">{{ end }}
33+
{{ end }}
2434

35+
<!-- Open Graph -->
36+
{{ template "_internal/opengraph.html" . }}
2537
{{ if .Params.og_image }}
2638
<meta property="og:image" content="{{ .Params.og_image }}" />
2739
{{ else }}

0 commit comments

Comments
 (0)