rawfeed 0.2.8 → 0.2.10

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: 86d58e6711cd5f71420c51b27cfbad68c02e4a8aa540d35b8313b4732d298644
4
- data.tar.gz: 9d05b52b5fa177ef8a45173b6ee14dc06c5a64bb0305267d7ea39153996be093
3
+ metadata.gz: 74f4cbc2531370514a2757a14b351634c9c7b341848685c512ff0967743e1e2a
4
+ data.tar.gz: 1ad644e795fe609546506ef1e64c6f02b228abb112bbf9590a402a2436a1dd20
5
5
  SHA512:
6
- metadata.gz: 9c5e4f5673ea2157a9b07afbb91177c20ac8c95536db126f7ef522f0c7cd2d2a22b0687cb2ad90d98532a4d32d81b221632059d19490d1a00a0be492c5951a42
7
- data.tar.gz: 9759f60419606c341417fdfcfac7491f89929cae639ffcde31f7dbc3e7fc1fa28704bbc3df70097f3ae5dcfe77d4bbe780ecb41ddcd88ee036faff36cbe83fe5
6
+ metadata.gz: f8eeb8a59ad5ce61dd4794e56d657ccdcce3484f805f6723e92f4a3dfcc80371c7e0aee0c738fe01a748131f5ab23cb94029f8f5949b423be331f56f2e4c05b9
7
+ data.tar.gz: ca576d6121bab1634e0d8c1b62d7426cb52554408df00ff7faf43468f1c7ea064b4b1e091387ee9a756566e8b0c2a771e015a0f229e87a01244f7f82deeb905c
@@ -21,10 +21,36 @@
21
21
  <meta property="og:site_name" content="{{ site_title }}">
22
22
  <meta property="og:type" content="website">
23
23
  <meta name="twitter:card" content="summary">
24
- <meta property="twitter:title" content="{{ site_title }}">
24
+ <meta name="twitter:title" content="{{ site_title }}">
25
+ {% for item in socials_.links %}
26
+ {% if item.url contains "x.com" %}
27
+ {% assign username = item.url | remove: "https://x.com/" %}
28
+ {% if username != blank %}
29
+ <meta name="twitter:site" content="@{{ username }}"/>
30
+ <meta name="twitter:creator" content="@{{ username }}">
31
+ {% endif %}
32
+ {% endif %}
33
+ {% endfor %}
25
34
  <meta name="robots" content="index, follow">
26
35
  <script type="application/ld+json">
27
- {"@context":"https://schema.org","@type":"WebSite","description":"{{ page.description | capitalize | default: header_.description | strip_html | truncate: 50 }}","headline":"{{ site_title }}","name":"{{ site_title }}","url":"{{ page.url | prepend: site.url }}"}</script>
36
+ {
37
+ "@context": "https://schema.org",
38
+ {% if page.url == "/blog/" %}
39
+ "@type": "BlogPosting",
40
+ "datePublished": "{{ page.date | date_to_xmlschema }}",
41
+ "author": {
42
+ "@type": "Person",
43
+ "name": "{{ author_.name }}"
44
+ },
45
+ {% else %}
46
+ "@type": "WebSite",
47
+ {% endif %}
48
+ "description": "{{ page.description | default: header_.description | strip_html | truncate: 160 | escape }}",
49
+ "headline": "{{ page.title | default: site_title | escape }}",
50
+ "name": "{{ site_title }}",
51
+ "url": "{{ page.url | prepend: site.url }}"
52
+ }
53
+ </script>
28
54
  <!-- SEO -->
29
55
 
30
56
  {% comment %} Security {% endcomment %}
@@ -36,7 +62,7 @@
36
62
  content="
37
63
  default-src 'self';
38
64
  img-src 'self' data: {{ head_.csp.img-src | join: ' ' }};
39
- script-src 'self' {{ head_.csp.script-src | join: ' ' }};
65
+ script-src 'self' 'unsafe-inline' {{ head_.csp.script-src | join: ' ' }};
40
66
  style-src 'self' 'unsafe-inline' {{ head_.csp.style-src | join: ' ' }};
41
67
  font-src 'self' {{ head_.csp.font-src | join: ' ' }} data:;
42
68
  connect-src 'self' {{ head_.csp.connect-src | join: ' ' }};
@@ -97,9 +123,34 @@
97
123
  {% comment %} feed {% endcomment %}
98
124
  <link rel="alternate" type="application/atom+xml" title="{{ site_title }}" href="{{ '/feed.xml' | relative_url }}">
99
125
 
126
+ <!-- Google Analytics -->
100
127
  {%- if jekyll.environment == 'production' and head_.google.analytics.enable == true and head_.google.analytics.id != "" -%}
101
- <!-- Google Analytics -->
102
- <script src="{{ '/assets/js/google_analytics.js' | relative_url }}"></script>
103
- <!-- Google Analytics -->
128
+ <script>
129
+ (function() {
130
+ function activeTrackers() {
131
+ var ga_id = "{{ head_.google.analytics.id }}";
132
+
133
+ var script = document.createElement('script');
134
+ script.async = true;
135
+ script.src = "https://www.googletagmanager.com/gtag/js?id=" + ga_id;
136
+ document.head.appendChild(script);
137
+
138
+ window.dataLayer = window.dataLayer || [];
139
+ function gtag(){dataLayer.push(arguments);}
140
+ gtag('js', new Date());
141
+ gtag('config', ga_id, {
142
+ 'cookie_domain': '{{ site.url | replace: "https://", "" | replace: "http://", "" | split: "/" | first }}',
143
+ 'anonymize_ip': true,
144
+ 'cookie_flags': 'SameSite=None;Secure',
145
+ 'update': true
146
+ });
147
+
148
+ console.log("Google Analytics loaded!");
149
+ }
150
+
151
+ // Chama direto, sem esperar o DOMContentLoaded, para capturar a visita o quanto antes
152
+ activeTrackers();
153
+ })();
154
+ </script>
104
155
  {%- endif -%}
105
156
  </head>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rawfeed
4
- VERSION = "0.2.8"
4
+ VERSION = "0.2.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rawfeed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - William C. Canin
@@ -231,7 +231,6 @@ files:
231
231
  - assets/js/fallback/resume.js
232
232
  - assets/js/fallback/tags.js
233
233
  - assets/js/fallback/theme_load.js
234
- - assets/js/google_analytics.coffee
235
234
  - assets/js/home.coffee
236
235
  - assets/js/no_inframe.coffee
237
236
  - assets/js/page.coffee
@@ -1,24 +0,0 @@
1
- ---
2
- ---
3
-
4
- {%- include layout/data.liquid -%}
5
-
6
- is_dnt_active = window.doNotTrack is "1" or navigator.doNotTrack is "1" or navigator.doNotTrack is "yes" or navigator.msDoNotTrack is "1"
7
-
8
- unless is_dnt_active
9
- gaLoader = (i,s,o,g,r,a,m) ->
10
- i[r] = i[r] or ->
11
- (i[r].q = i[r].q or []).push arguments
12
- i['GoogleAnalyticsObject'] = r
13
- i[r].l = 1 * new Date()
14
- a = s.createElement o
15
- m = s.getElementsByTagName(o)[0]
16
- a.async = 1
17
- a.src = g
18
- m.parentNode.insertBefore a, m
19
-
20
- gaLoader window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'
21
-
22
- # envio dos comandos de rastreamento
23
- ga 'create', '{{ head_.google.analytics.id }}', 'auto'
24
- ga 'send', 'pageview'