jekyll-theme-yat 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/extensions/google-analytics.html +16 -9
- data/_includes/head.html +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a435ef6001371fcf5562037fc2e45c466af7617b5eec3baea067254bfdec9f69
|
4
|
+
data.tar.gz: 0a31d8fe912a761ec58b519109db028304e2039a43a7588ffae5017a2b0d57e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf0168e62b3a505dcd3a727f8391c3b82652c501a63a6ef16644b39b4f3f31598d0fb29b236a7e24243ed7bf3c64954e4fd83dce5874009037b8456c09b3cbba
|
7
|
+
data.tar.gz: 15798054a9ce741f8efec0980cd14de59ced3e9e01c0663fee9bf058680838b75b0f76a73a6f9579f96147bc53ba86a647d81bd50185f0e0064c264975882dfd
|
@@ -1,12 +1,19 @@
|
|
1
1
|
<script>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
2
|
+
function initGoogleAnalytics() {
|
3
|
+
var doNotTrack = (window.doNotTrack === "1" || navigator.doNotTrack === "1" ||
|
4
|
+
navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1");
|
5
|
+
var enableDNT = "{{ site.enableDNT | default: true }}" == "true";
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
}
|
7
|
+
if (!enableDNT || !doNotTrack) {
|
8
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
9
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
10
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
11
|
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
12
|
+
|
13
|
+
ga('create', '{{ site.google_analytics }}', 'auto');
|
14
|
+
ga('send', 'pageview');
|
15
|
+
}
|
16
|
+
}
|
17
|
+
initGoogleAnalytics();
|
11
18
|
</script>
|
12
|
-
|
19
|
+
|
data/_includes/head.html
CHANGED
@@ -11,6 +11,6 @@
|
|
11
11
|
<link rel="stylesheet" href="{{ "/assets/main.css" | relative_url }}">
|
12
12
|
{%- feed_meta -%}
|
13
13
|
{%- if jekyll.environment == 'production' and site.google_analytics -%}
|
14
|
-
{%- include google-analytics.html -%}
|
14
|
+
{%- include extensions/google-analytics.html -%}
|
15
15
|
{%- endif -%}
|
16
16
|
</head>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-theme-yat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeffreytse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|