termina-plex 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3191be0873ad818c702c14a73f27416b07493521b34d6d4bf38cbe5f1649ee7d
4
- data.tar.gz: 2dea759a907ff919189b21123c6215cfc2ad9311ce48aef8dca9da5f3b3b30dd
3
+ metadata.gz: f135e760039f4a54acb6c72d5134c34ab93e9a0042659ca5cdfa697df04361c1
4
+ data.tar.gz: 6c0044d62d44e1b54b17d5da0dc12fae6bd09ad72cf52e94ae38406b49c03a92
5
5
  SHA512:
6
- metadata.gz: ce516d997c7f4429acc38d33feb76ef45673879ef9bad0c1df614860a29874ac7e7b3d0be82f4489f9d5420e3fc3e87923385358093297a2cc97b35a221dfb13
7
- data.tar.gz: 469abddfad9057fa6218e7b4cc007adaf1483a9940652d31c056202f7770a4093669d59f9694b7c94d892c7bff9bb06c4fcc040491dbf5cce2426b89e1cd7bf0
6
+ metadata.gz: ae3d03a1716dc9303a8b76606a120c729080646f3bcaf77d88993d1fbccb0a17a1cd2d18bb700598444890ca1c0e5ab51df02191ba64671948240cc158367d21
7
+ data.tar.gz: 80aa4efd0ad4a97ae03138457ebf41a156521c2e17ec0e2eea57279e0ab555f93f37a5271daaadd8da54695aa1d1c0dbf5ebcd66f327b71c8bd69074de9a2ba0
data/README.md CHANGED
@@ -36,9 +36,43 @@ For pagination to work with the post listing page hosted under `/blog`, the `pag
36
36
 
37
37
  If you want to change the path for the post listing page, the `blog_path` setting can be set to the preferred path. The `paginate_path` setting should also be updated to reflect the correct path.
38
38
 
39
+ ## Google and Umami Analytics
40
+
41
+ This theme provides support for Google and Umami Analytics by setting appropriate site configuration values.
42
+
43
+ ### Google Analytics
44
+
45
+ To automatically add the necessary Google tag to the site, add the following line to the top level of `_config.yml`:
46
+
47
+ ```yaml
48
+ google_analytics: G-XXXXX
49
+ ```
50
+
51
+ Replace `G-XXXXX` with the appropriate measurement ID.
52
+
53
+ ### Umami Analytics
54
+
55
+ To automatically add the necessary Umami analytics tag to the site, add the following lines to the top level of `_config.yml`:
56
+
57
+ ```yaml
58
+ umami_analytics:
59
+ url: "https://example.org/umami.js"
60
+ data_website_id: "abc"
61
+ ```
62
+
63
+ Replace the `url` and `data_website_id` with the appropriate values for your Umami Analytics instance.
64
+
65
+ Additional parameters can be set in the tag by providing the appropriate values for the following keys under `umami_analytics`:
66
+
67
+ | Umami Tag Parameter | Site Configuration |
68
+ | --- | --- |
69
+ | data-host-url | data_host_url |
70
+ | data-auto-track | data_auto_track |
71
+ | data-domains | data_domains |
72
+
39
73
  ## Theme Configuration
40
74
 
41
- Theme specific configuration is done within the `termina-plex` section of the `_config.yaml` file.
75
+ Theme specific configuration is done within the `termina-plex` section of the `_config.yml` file.
42
76
 
43
77
  The date format used by the theme is defined by the `termina-plex.date_format` setting. The value needs to be in [valid `strftime` format](https://docs.ruby-lang.org/en/master/strftime_formatting_rdoc.html). The theme defaults to `%d %b %Y`.
44
78
 
data/_includes/head.html CHANGED
@@ -8,6 +8,9 @@
8
8
  {%- if jekyll.environment == 'production' and site.google_analytics -%}
9
9
  {%- include google-analytics.html -%}
10
10
  {%- endif -%}
11
+ {%- if site.umami_analytics.url and site.umami_analytics.data_website_id -%}
12
+ {%- include umami-analytics.html -%}
13
+ {%- endif -%}
11
14
 
12
- {%- include custom-head.html -%}
15
+ {%- include custom-head.html %}
13
16
  </head>
@@ -0,0 +1,16 @@
1
+ {%- if site.umami_analytics.url and site.umami_analytics.data_website_id %}
2
+ <script
3
+ defer
4
+ src="{{ site.umami_analytics.url }}"
5
+ data-website-id="{{ site.umami_analytics.data_website_id }}"
6
+ {%- if site.umami_analytics.data_host_url %}
7
+ data-host-url="{{ site.umami_analytics.data_host_url }}"
8
+ {%- endif -%}
9
+ {%- if site.umami_analytics.data_auto_track %}
10
+ data-auto-track="{{ site.umami_analytics.data_auto_track }}"
11
+ {%- endif -%}
12
+ {%- if site.umami_analytics.data_domains %}
13
+ data-domains="{{ site.umami_analytics.data_domains }}"
14
+ {%- endif -%}
15
+ ></script>
16
+ {%- endif %}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: termina-plex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Linh Pham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-29 00:00:00.000000000 Z
11
+ date: 2024-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -111,6 +111,7 @@ files:
111
111
  - _includes/header.html
112
112
  - _includes/tag-archive.html
113
113
  - _includes/theme-toggle.html
114
+ - _includes/umami-analytics.html
114
115
  - _layouts/base.html
115
116
  - _layouts/category.html
116
117
  - _layouts/home.html