Skip to content

Commit

Permalink
energy doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sxmxta committed Sep 10, 2024
1 parent 576055c commit e32f732
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .vitepress/config/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ export function head(): HeadConfig[] {
['meta', {property: 'google-site-verification', content: 'y1ft7YSwR6LAzQsR3s2OBajPkbLz16MDC809PgeHYfI'}],
['meta', {property: 'og:image', content: 'https://energye.github.io/imgs/energy.png'}],
['meta', {property: 'og:url', content: 'https://energye.github.io'}],
['script', {},`
window._hmt = window._hmt || [];
(function() {
let hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?5c579ee49a29203cd8dff7fa8eda5ac9";
let s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`
],
]
}

Expand Down
8 changes: 8 additions & 0 deletions .vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import DefaultTheme from "vitepress/theme";
import './index.css'

DefaultTheme.enhanceApp = ({ app, router, siteData }) => {
router.onBeforeRouteChange = (to) => {
if (typeof _hmt !== 'undefined') {
_hmt.push(['_trackPageview', to]);
}
};
};

export default DefaultTheme

0 comments on commit e32f732

Please sign in to comment.