Skip to content

Commit 849411d

Browse files
author
linjianyou
committed
SEO 优化,ads.txt配置。
1 parent ec92179 commit 849411d

File tree

5 files changed

+46
-9
lines changed

5 files changed

+46
-9
lines changed

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 配置 hugo.toml 放置在主项目里,放在cofnig/_default/hugo.toml里发现会有问题,编译不出文档了。
2+
> 谷歌统计id需要替换
3+
4+
# 谷歌广告ads.txt放在主项目的static目录
5+
6+
# content的目录必需包含about, [content/js/_index.md](content/js/_index.md)文件,因为此文件生成的PWA 的Service-worker用到此生成的swconf.js配置,注册了许多缓存目录配置
7+
> 缓存配置需要在pwa的配置里添加正确的路径,否则会注册失败。
8+
9+
# 模板替换:
10+
> head_custom.html 修改一些head 的脚本,如广告,统计等。
11+
12+
# 待解决问题:
13+
- 搜索栏很卡
14+
- 评论系统需要修改平台
15+
- permalink的规则,会导致解析的文章数量偏少。目前的content的结构是posts = "/posts/:sections/:slug/"可以解析多个。
16+
17+
# SEO优化配置,设置描述,图片,会在head生成og:的Meta标签

hugo.toml

+8-8
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,20 @@ fingerprint = ""
107107
dateFormat = "2006-01-02"
108108
# website title for Open Graph and Twitter Cards
109109
# 网站标题, 用于 Open Graph 和 Twitter Cards
110-
title = "技术博客"
110+
title = "掘金小册"
111111
# website description for RSS, SEO, Open Graph and Twitter Cards
112112
# 网站描述, 用于 RSS, SEO, Open Graph 和 Twitter Cards
113-
description = "技术博客"
113+
description = "掘金小册,技术博客,收录各大讲师实用课程。"
114114
# website images for Open Graph and Twitter Cards
115115
# 网站图片, 用于 Open Graph 和 Twitter Cards
116-
images = ["/logo.png"]
116+
images = ["/Apple-Devices-Preview.png"]
117117

118118
# Author config
119119
# 作者配置
120120
[params.author]
121121
name = "JAY.LIN"
122-
email = ""
123-
link = ""
122+
123+
link = "https://linjonh.github.io"
124124

125125
[params.pwa]
126126
enabled = true
@@ -150,7 +150,7 @@ mobileMode = "auto"
150150
logo = ""
151151
# title name
152152
# 标题名称
153-
name = "技术博客"
153+
name = "掘金小册"
154154
# you can add extra information before the name (HTML format is supported), such as icons
155155
# 你可以在名称 (允许 HTML 格式) 之前添加其他信息, 例如图标
156156
pre = "<i class='far fa-kiss-wink-heart fa-fw' aria-hidden='true'></i>"
@@ -218,7 +218,7 @@ rss = 10
218218
[params.app]
219219
# optional site title override for the app when added to an iOS home screen or Android launcher
220220
# 当添加到 iOS 主屏幕或者 Android 启动器时的标题, 覆盖默认标题
221-
title = "技术博客"
221+
title = "掘金小册"
222222
# whether to omit favicon resource links
223223
# 是否隐藏网站图标资源链接
224224
noFavicon = false
@@ -958,7 +958,7 @@ rss = 10
958958
enable = true
959959
gravatarEmail = ""
960960
avatarURL = "https://api.vvhan.com/api/avatar/boy"
961-
title = "技术博客分享"
961+
title = "技术交流分享"
962962
subtitle = "闻道有先后-术业有专攻"
963963
typeit = true
964964
social = true

ads.txt renamed to static/ads.txt

File renamed without changes.

static/site.webmanifest

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "掘金小册",
3+
"short_name": "掘金小册",
4+
"icons": [
5+
{
6+
"src": "/android-chrome-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png"
9+
},
10+
{
11+
"src": "/android-chrome-512x512.png",
12+
"sizes": "512x512",
13+
"type": "image/png"
14+
}
15+
],
16+
"start_url": "/index.html",
17+
"theme_color": "#ffffff",
18+
"background_color": "#ffffff",
19+
"display": "fullscreen"
20+
}

themes/loveit

0 commit comments

Comments
 (0)