jekyll-whiteglass 1.10.4 → 1.11.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2a2cc2a1b0f66fcf4219c708ee2529c5e234430bb656a83a7a265b85a57861c
4
- data.tar.gz: f6675e75cccd06e10361b29dd13cf16e28c1c5cf0306c04cfb7321ea105c1581
3
+ metadata.gz: c80975334e2797b740692525664cbde3fbf71db318dd57cea20f8983cfb9d370
4
+ data.tar.gz: '085dd2dbc91d334f2f99ba1fe8dac16576bdfd86291410392bd0e5e6e748a8d1'
5
5
  SHA512:
6
- metadata.gz: b6459df2ffd07a68bbb2d8ac53f90b0366b4b39bd0a6a91795f25f50eade7489989521ce4b710bbfe24c250f3da62efc23a57a70f6245d0addbb071a69c21e02
7
- data.tar.gz: 7c7e59f414215ecd7d0f1b67ed9459bf9e473b497f35460de3825ea1ac9322eeea15d4721f548ed0095163350f6b19e3a7ed43d8564df20e0399d33e7fd9313b
6
+ metadata.gz: 5b4c315fd35a88c7920c0a1a2c94d22542152478ca51d909affff4c32d1558d8a632429f5850cef5bb01bed8b0928249647287172197d020920da21eb3f6634d
7
+ data.tar.gz: 9c3ba65ffc2242fa30fe3de0d6b5c1ddd7d6a51d47e5cfd801e31b9ebc584d2ea067d1279cf73a75e087998c9d7ac86b818291ab510323831a24ed2fefac1126
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # ChangeLog
2
2
 
3
+ ## 1.11.0 (2021-07-21)
4
+
5
+ - Update for Google Analytics 4
6
+
3
7
  ## 1.10.4 (2021-03-15)
4
8
 
5
9
  - Add French translation (#42)
data/README.md CHANGED
@@ -37,7 +37,9 @@ gem install jekyll-whiteglass
37
37
 
38
38
  1. Go to [yous/whiteglass-template](https://github.com/yous/whiteglass-template).
39
39
  2. Click "Use this template" button, and then create a repository.
40
- 3. Push some content, then GitHub Actions will generate the site.
40
+ 3. Change the options defined in _config.yml. See [Configuration](https://github.com/yous/whiteglass-template#configuration)
41
+ section under whiteglass-template.
42
+ 4. Push some content, then GitHub Actions will generate the site.
41
43
 
42
44
  ## Manual Setup
43
45
 
@@ -346,6 +348,14 @@ To enable Google Analytics, add the following lines to your Jekyll site:
346
348
  google_analytics: UA-NNNNNNNN-N
347
349
  ```
348
350
 
351
+ For Google Analytics 4, add the following lines:
352
+
353
+ ``` yaml
354
+ google_analytics: G-NNNNNNNNNN
355
+ ```
356
+
357
+ Replace `N`s with your specific ID.
358
+
349
359
  ## Contributing
350
360
 
351
361
  Bug reports and pull requests are welcome on GitHub at
@@ -1,13 +1,25 @@
1
1
  {% if site.google_analytics %}
2
- <!-- Google Analytics -->
3
- <script>
4
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
5
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
6
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
7
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
2
+ {% assign prefix = site.google_analytics | slice: 0, 2 %}
3
+ {% if prefix == "G-" %}
4
+ <!-- Global site tag (gtag.js) - Google Analytics -->
5
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
6
+ <script>
7
+ window.dataLayer = window.dataLayer || [];
8
+ function gtag(){dataLayer.push(arguments);}
9
+ gtag('js', new Date());
8
10
 
9
- ga('create', '{{ site.google_analytics }}', 'auto');
10
- ga('send', 'pageview');
11
+ gtag('config', '{{ site.google_analytics }}');
12
+ </script>
13
+ {% else %}
14
+ <!-- Google Analytics -->
15
+ <script>
16
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
17
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
18
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
19
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
11
20
 
12
- </script>
21
+ ga('create', '{{ site.google_analytics }}', 'auto');
22
+ ga('send', 'pageview');
23
+ </script>
24
+ {% endif %}
13
25
  {% endif %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-whiteglass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.4
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chayoung You
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2021-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubygems_version: 3.2.3
155
+ rubygems_version: 3.2.22
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Minimal, responsive Jekyll theme for hackers.