Skip to content

Commit

Permalink
Merge pull request #29 from YDX-2147483647/analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
YDX-2147483647 authored Mar 30, 2024
2 parents 217c9ec + 6a55082 commit da739f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ extra_css:
- asset/style/extra.css

extra:
analytics:
provider: custom
property: a6bf04b80f6b97b6333ee4cf099290ea
# Whether and where to load scripts
#
# - `development` ⇒ load from Vite dev server http://localhost:5173
Expand Down
10 changes: 10 additions & 0 deletions overrides/partials/integrations/analytics/custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script>
// 百度统计
var _hmt = _hmt || [];
(function () {
const hm = document.createElement("script")
hm.src = "https://hm.baidu.com/hm.js?{{ config.extra.analytics.property }}"
const s = document.getElementsByTagName("script")[0]
s.parentNode.insertBefore(hm, s)
})();
</script>

0 comments on commit da739f4

Please sign in to comment.