Skip to content

Commit

Permalink
UJ: Merged from template.
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwieds committed May 25, 2024
2 parents 01506e4 + 1fcf5e3 commit 4e760a9
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 63 deletions.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ group :jekyll_plugins do
# Master Plugins
gem "jekyll-paginate-v2", "= 3.0.0"
gem "jekyll-liquify", "= 0.0.2" # ❌ Version 0.0.3 breaks the site
gem "jekyll-truthyfalsy", "= 1.0.2"
gem "jekyll-truthyfalsy", "~> 1.0"
gem "jekyll-uj-powertools", "~> 1.0"

# Project Plugins
end
Expand Down
4 changes: 3 additions & 1 deletion _includes/master/modules/adunits/adsense-display.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{%- if page.advertising.google-adsense == false -%}
{%- elsif layout.advertising.google-adsense == false -%}
{%- elsif site.advertising.google-adsense != false -%}
<!-- Adunit - Adsense Display Ad-->
<!-- Adunit - Adsense Display Ad -->
<!-- ADUNIT_TRIGGER_START -->
{%- if include.include-adsense-script == true -%}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-{{ site.advertising.google-adsense }}" crossorigin="anonymous"></script>
{%- endif -%}
Expand All @@ -19,4 +20,5 @@
</div>

{% include /master/modules/adunits/fallback/insert.html %}
<!-- ADUNIT_TRIGGER_END -->
{%- endif -%}
4 changes: 3 additions & 1 deletion _includes/master/modules/adunits/adsense-in-article.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{%- if page.advertising.google-adsense == false -%}
{%- elsif layout.advertising.google-adsense == false -%}
{%- elsif site.advertising.google-adsense != false -%}
<!-- Adunit - Adsense In-article Ad-->
<!-- Adunit - Adsense In-article Ad -->
<!-- ADUNIT_TRIGGER_START -->
{%- if include.include-adsense-script == true -%}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-{{ site.advertising.google-adsense }}" crossorigin="anonymous"></script>
{%- endif -%}
Expand All @@ -19,4 +20,5 @@
</div>

{% include /master/modules/adunits/fallback/insert.html %}
<!-- ADUNIT_TRIGGER_END -->
{%- endif -%}
4 changes: 3 additions & 1 deletion _includes/master/modules/adunits/adsense-in-feed.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{%- if page.advertising.google-adsense == false -%}
{%- elsif layout.advertising.google-adsense == false -%}
{%- elsif site.advertising.google-adsense != false -%}
<!-- Adunit - Adsense In-feed Ad-->
<!-- Adunit - Adsense In-feed Ad -->
<!-- ADUNIT_TRIGGER_START -->
{%- if include.include-adsense-script == true -%}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-{{ site.advertising.google-adsense }}" crossorigin="anonymous"></script>
{%- endif -%}
Expand All @@ -27,4 +28,5 @@
</div>

{% include /master/modules/adunits/fallback/insert.html %}
<!-- ADUNIT_TRIGGER_END -->
{%- endif -%}
4 changes: 3 additions & 1 deletion _includes/master/modules/adunits/adsense-multiplex.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{%- if page.advertising.google-adsense == false -%}
{%- elsif layout.advertising.google-adsense == false -%}
{%- elsif site.advertising.google-adsense != false -%}
<!-- Adunit - Adsense Multiplex Ad-->
<!-- Adunit - Adsense Multiplex Ad -->
<!-- ADUNIT_TRIGGER_START -->
{%- if include.include-adsense-script == true -%}
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-{{ site.advertising.google-adsense }}" crossorigin="anonymous"></script>
{%- endif -%}
Expand All @@ -18,4 +19,5 @@
</div>

{% include /master/modules/adunits/fallback/insert.html %}
<!-- ADUNIT_TRIGGER_END -->
{%- endif -%}
56 changes: 0 additions & 56 deletions special/master/feeds/posts-copy.xml

This file was deleted.

41 changes: 41 additions & 0 deletions special/master/feeds/posts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
layout: null
permalink: /feeds/posts.json
---

{
"version": "https://jsonfeed.org/version/1",
"title": "{{ site.brand.name }} Blog",
"home_page_url": "{{ site.url }}/blog",
"feed_url": "{{ site.url }}{{ page.url }}",
"description": "{{ site.brand.description }}",
"generator": "Jekyll {{ jekyll.version }}",
"language": "en",
"favicon": "{{ site.favicon.path }}",
"items": [
{%- assign sortedFeed = site.posts | limit:25 | sort: 'date' | reverse -%}
{% for post in sortedFeed %}
{
"id": "{{ site.url }}{{ post.url }}",
"url": "{{ site.url }}{{ post.url }}",
"title": "{{ post.title | strip_html | strip_newlines | json_escape }}",
"date_published": "{{ post.date | date: "%Y-%m-%dT%H:%M:%S" }}.000Z",
"image": "{{ post.image }}",
"content_text": "{{ post.content | liquify | markdownify | strip_html | json_escape | replace: '\n', ' ' | replace: '\r', ' ' | strip_newlines }}",
"content_html": "{{ post.content | liquify | markdownify | strip_ads | json_escape | replace: '\n', ' ' | replace: '\r', ' ' | strip_newlines }}",
"authors": [
{
"name": "{{ site.brand.name }}"
}
],
"attachments": [
{
"url": "{{ post.image }}"
}
],
"summary": "{{ post.post.excerpt | strip_html | strip_newlines | json_escape }}",
"tags": ["{{ post.post.category }}"]
}{% if forloop.last == false %},{% endif %}
{% endfor %}
]
}
7 changes: 5 additions & 2 deletions special/master/feeds/posts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ permalink: /feeds/posts.xml
<lastBuildDate>
{{ site.time | date: "%a, %d %b %Y %H:%M:%S" }} GMT
</lastBuildDate>
<language>
<![CDATA[ en ]]>
</language>

{% assign sortedFeed = site.posts | limit:10 | sort: 'date' | reverse %}
{% assign sortedFeed = site.posts | limit:25 | sort: 'date' | reverse %}

{% for post in sortedFeed %}
{%- capture post-title -%}
Expand Down Expand Up @@ -62,7 +65,7 @@ permalink: /feeds/posts.xml
</description>
<content:encoded>
<![CDATA[
{{ post.content | liquify | markdownify }}
{{ post.content | liquify | markdownify | strip_ads }}
]]>
</content:encoded>
<dc:creator>
Expand Down

0 comments on commit 4e760a9

Please sign in to comment.