Skip to content

Commit 59a1904

Browse files
author
微信公众号:储凡
authored
Merge pull request #151 from 142vip/feat/vuepress-header
feat(@142vip/vuepress): 增加开源博客站点的`header`配置
2 parents 98174ce + a8894aa commit 59a1904

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

packages/vuepress/src/core/headers.ts

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { HeadConfig } from '../types'
22

33
/**
4-
* 408CSFamily
4+
* 示例配置
55
*/
66
export const exampleHeaders: HeadConfig[] = [
77
[
@@ -33,9 +33,26 @@ export const exampleHeaders: HeadConfig[] = [
3333
export const FamilyHeaders: HeadConfig[] = [
3434
[
3535
'link',
36-
{ rel: 'icon', href: 'fight_favicon.ico' },
36+
{ rel: 'icon', href: '/408_favicon.ico' },
3737
],
3838
// vercel统计 相关配置
39+
40+
[
41+
'script',
42+
{ type: 'text/javascript', src: '/_vercel/insights/script.js' },
43+
],
44+
// 百度统计
45+
[
46+
'script',
47+
{},
48+
`var _hmt = _hmt || [];
49+
(function() {
50+
var hm = document.createElement("script");
51+
hm.src = "https://hm.baidu.com/hm.js?3515cc46ae60747b778140f0e5e22dfe";
52+
var s = document.getElementsByTagName("script")[0];
53+
s.parentNode.insertBefore(hm, s);
54+
})();`,
55+
],
3956
]
4057

4158
/**
@@ -47,4 +64,20 @@ export const JSCHeaders: HeadConfig[] = [
4764
{ rel: 'icon', href: 'fight_favicon.ico' },
4865
],
4966
// vercel统计 相关配置
67+
[
68+
'script',
69+
{ type: 'text/javascript', src: '/_vercel/insights/script.js' },
70+
],
71+
// 百度统计
72+
[
73+
'script',
74+
{},
75+
`var _hmt = _hmt || [];
76+
(function() {
77+
var hm = document.createElement("script");
78+
hm.src = "https://hm.baidu.com/hm.js?613c9d7af9e1c9a7f9eef6a55aa2399d";
79+
var s = document.getElementsByTagName("script")[0];
80+
s.parentNode.insertBefore(hm, s);
81+
})();`,
82+
],
5083
]

0 commit comments

Comments
 (0)