Skip to content

Commit

Permalink
Add baidu tongji
Browse files Browse the repository at this point in the history
  • Loading branch information
northword authored Oct 5, 2023
1 parent 8869224 commit 17aa3d9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,26 @@ export default defineUserConfig({
},
],
}),

() => {
const key = "5574297d56b065f5137cf3654e3de360";
return {
name: "vuepress-plugin-baidu-tongji",
extendsPage: (page) => {
page.frontmatter.head = page.frontmatter.head || [];
page.frontmatter.head?.push([
"script",
{
type: "text/javascript",
},
"var _hmt = _hmt || []",
]);
page.frontmatter.head?.push([
"script",
{ src: `https://hm.baidu.com/hm.js?${key}` },
]);
},
};
},
],
});

1 comment on commit 17aa3d9

@vercel
Copy link

@vercel vercel bot commented on 17aa3d9 Oct 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.