Skip to content

Commit

Permalink
Fix feed and analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasrla committed Apr 12, 2022
1 parent 3b63162 commit 0a5d3a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ colors:
favicon_safari_mask_icon: "#5ac8fa"

################################# ANALYTICS

#
# set this up with a proper URL if you are using Shynet

analytics:
shynet:
# MUST insert an url with NO trailing slash!
url: https://shynet.john_doe_website.com/ingress/uuid-universally-unique-identifier
# url: https://shynet.john_doe_website.com/ingress/uuid-universally-unique-identifier

# add tiny pixel to count feed reads, must add `_layouts/feed.xml` file
pixel_feed: true

Expand All @@ -62,6 +64,7 @@ feed:
################################# JEKYLL PLUGINS

plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-sitemap
- jekyll-optional-front-matter
Expand Down
2 changes: 1 addition & 1 deletion _includes/analytics.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if jekyll.environment != "local" and site.analytics.shynet %}
{% if jekyll.environment != "local" and site.analytics.shynet.url.size > 0 %}

{% comment %} This is to prevent double slashes "//" {% endcomment %}

Expand Down
2 changes: 1 addition & 1 deletion _layouts/feed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{% assign excerpt_only = post.feed.excerpt_only | default: site.feed.excerpt_only %}
{% unless excerpt_only %}
{% comment %}Add tiny Shynet pixel to count RSS reads{% endcomment %}
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}"><![CDATA[{{ post.content | strip }}{% if site.analytics.shynet.pixel_feed %}<img src="{{ site.analytics.shynet.url }}/pixel.gif">{% endif %}]]></content>
<content type="html" xml:base="{{ post.url | absolute_url | xml_escape }}"><![CDATA[{{ post.content | strip }}{% if site.analytics.shynet.url.size > 0 and site.analytics.shynet.pixel_feed %}<img src="{{ site.analytics.shynet.url }}/pixel.gif">{% endif %}]]></content>
{% endunless %}

{% assign post_author = post.author | default: post.authors[0] | default: site.author %}
Expand Down

0 comments on commit 0a5d3a8

Please sign in to comment.