mirror of
https://github.com/MeiK2333/github-style.git
synced 2025-10-07 01:54:06 +00:00
@@ -144,7 +144,6 @@ baseURL = "https://meik2333.com/"
|
||||
languageCode = "zh-cn"
|
||||
title = "MeiK's blog"
|
||||
theme = "github-style"
|
||||
googleAnalytics = "UA-123456-789"
|
||||
pygmentsCodeFences = true
|
||||
pygmentsUseClasses = true
|
||||
|
||||
@@ -193,6 +192,10 @@ pygmentsUseClasses = true
|
||||
[frontmatter]
|
||||
lastmod = ["lastmod", ":fileModTime", ":default"]
|
||||
|
||||
[services]
|
||||
[services.googleAnalytics]
|
||||
ID = "UA-123456-789"
|
||||
|
||||
```
|
||||
|
||||
## Support collapsible block
|
||||
|
@@ -2,7 +2,6 @@ baseURL = "https://meik2333.com/"
|
||||
languageCode = "zh-cn"
|
||||
title = "MeiK's blog"
|
||||
theme = "github-style"
|
||||
googleAnalytics = "UA-123456-789"
|
||||
pygmentsCodeFences = true
|
||||
pygmentsUseClasses = true
|
||||
|
||||
@@ -50,3 +49,7 @@ pygmentsUseClasses = true
|
||||
|
||||
[frontmatter]
|
||||
lastmod = ["lastmod", ":fileModTime", ":default"]
|
||||
|
||||
[services]
|
||||
[services.googleAnalytics]
|
||||
ID = "UA-123456-789"
|
||||
|
@@ -42,16 +42,5 @@
|
||||
|
||||
<!-- Google Analytics -->
|
||||
{{ if eq (getenv "HUGO_ENV") "production"}}
|
||||
{{ with .Site.GoogleAnalytics }}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
|
||||
<script>
|
||||
if (navigator.doNotTrack !== '1') {
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag() { dataLayer.push(arguments); }
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{ . }}');
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user