termina-plex 0.2.1 → 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 +4 -4
- data/README.md +37 -1
- data/_includes/head.html +4 -1
- data/_includes/umami-analytics.html +16 -0
- data/_layouts/home.html +6 -1
- data/_sass/termina-plex/layout/posts.scss +4 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f135e760039f4a54acb6c72d5134c34ab93e9a0042659ca5cdfa697df04361c1
|
4
|
+
data.tar.gz: 6c0044d62d44e1b54b17d5da0dc12fae6bd09ad72cf52e94ae38406b49c03a92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
|
@@ -50,6 +84,8 @@ The social links displayed under the site title in the main section of the landi
|
|
50
84
|
|
51
85
|
If centered tables are preferred, the `termina-plex.centered_tables` setting can be set to `true`. By default, it uses the user agent's default alignment.
|
52
86
|
|
87
|
+
By default, the theme will transform post titles to be capitalized on pages that use the `home` layout. If you prefer to have post titles not be transformed, you can set `termina-plex.standard_titles` to `true`.
|
88
|
+
|
53
89
|
## Screenshots
|
54
90
|
|
55
91
|

|
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 %}
|
data/_layouts/home.html
CHANGED
@@ -7,7 +7,8 @@ layout: base
|
|
7
7
|
{%- assign posts = site.posts -%}
|
8
8
|
{% endif %}
|
9
9
|
{%- assign date_format = site.termina-plex.date_format | default: "%d %b %Y" -%}
|
10
|
-
{%- assign blog_path = site.blog_path | default: "/blog"
|
10
|
+
{%- assign blog_path = site.blog_path | default: "/blog" -%}
|
11
|
+
{%- assign standard_titles = site.termina-plex.standard_titles -%}
|
11
12
|
|
12
13
|
<article class="postWrapper">
|
13
14
|
<header class="postHeader">
|
@@ -18,7 +19,11 @@ layout: base
|
|
18
19
|
<div class="postsEntries">
|
19
20
|
{%- for post in posts -%}
|
20
21
|
<div class="postInfo">
|
22
|
+
{%- if standard_titles -%}
|
21
23
|
<h2 class="postTitle">
|
24
|
+
{%- else -%}
|
25
|
+
<h2 class="postTitle capitalize-title">
|
26
|
+
{%- endif -%}
|
22
27
|
<a class="postListLink" href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
|
23
28
|
</h2>
|
24
29
|
{%- if post.date -%}
|
@@ -18,12 +18,15 @@
|
|
18
18
|
font-family: $header-font-family;
|
19
19
|
font-size: 1.2em;
|
20
20
|
font-weight: 400;
|
21
|
-
text-transform: capitalize;
|
22
21
|
float: left;
|
23
22
|
width: 75%;
|
24
23
|
margin: 0 0 1rem 0;
|
25
24
|
}
|
26
25
|
|
26
|
+
.postTitle.capitalize-title {
|
27
|
+
text-transform: capitalize;
|
28
|
+
}
|
29
|
+
|
27
30
|
.postHeader {
|
28
31
|
overflow: hidden;
|
29
32
|
}
|
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.
|
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-
|
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
|