Skip to content

Commit

Permalink
Added google analytics stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
ProbablyIdiot committed Dec 18, 2024
1 parent c68b1a1 commit 38ea030
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
11 changes: 10 additions & 1 deletion _includes/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@
<link rel="stylesheet" href="https://unpkg.com/98.css">
<link rel="shortcut icon" type="image/png" href="/favicon.png">
<link rel="alternate" type="application/rss+xml" href="https://probablysomething.co.uk/feed.xml"/>
</head>
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-YDPCLMPZ5P"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-YDPCLMPZ5P');
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,16 @@ mainIco: /assets/images/w98-icons/executable_script-0.png

This is one of the most overly complex and undocumented jekyll problems I've come across so far (apart from pagination - but I try to block that out of my memory). I'll try to make this short and easy to follow, but no promises.



### Step 1 - Install `jekyll-feed`

You might think "Why would I want an RSS feed? I want a newsletter!". However, this is the simplest way of doing it. At the moment there are no plugins or tutorials for directly sending emails from your jekyll site (or none that I could find), therefore, the easiest way to make a newsletter is to copy your RSS feed.

Just follow the instructions on the [jekyll-feed Github](https://github.com/jekyll/jekyll-feed) to install the plugin, and check that it works by going to `yoururl.com/feed.xml`. If it worked, you should see something like this, with the text containing all blog posts you have previously made.![](/assets/postImages/feedXml.png)



### Step 2 - Setup a mailing website to mirror your RSS feed

This is the step that has taken forever to figure out. The most popular option for setups like this is [Intuit Mailchimp](https://mailchimp.com), however, they can get quite pricey and I prefer something open-source. At first I tried the [RSS2Newsletter]([GitHub - ElliotKillick/rss2newsletter: Convert RSS/Atom feed to email newsletters](https://github.com/ElliotKillick/rss2newsletter)) project, however I could not manage to get it to install on my raspberry pi. I then spent ages looking through google for a free alternative. This is when I stumbled upon [rssto.email](https://rssto.email). A FOSS project hosted on Github that will convert any RSS feed into a newsletter and deliver it straight to your inbox. They have a simple user interface, and allow you to embed a link for your RSS feed straight into your blog. This can be annoying to setup, however, so look at step 3 for how to do that.



### Step 3 - Setting up a link for `rssto.email`

Head to their website, and click the EMBED ON YOUR BLOG button. Input the link to your RSS feed and then copy the link.
Expand All @@ -38,6 +32,4 @@ Then use this code (replacing `yourURL.com` with the link you copied) to create
</form>
```



There you go! You should now have a fully functional newsletter for your users to keep up with all your blog posts. My next blog should be on adding comments, so keep an eye out for that.
2 changes: 1 addition & 1 deletion _site/feed.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2024-12-12T17:25:57+00:00</updated><id>http://localhost:4000/feed.xml</id><entry><title type="html">How to make a newsletter for a jekyll blog</title><link href="http://localhost:4000/posts/How-to-make-a-newsletter-for-a-Jekyll-blog.html" rel="alternate" type="text/html" title="How to make a newsletter for a jekyll blog" /><published>2024-12-12T00:00:00+00:00</published><updated>2024-12-12T00:00:00+00:00</updated><id>http://localhost:4000/posts/How%20to%20make%20a%20newsletter%20for%20a%20Jekyll%20blog</id><content type="html" xml:base="http://localhost:4000/posts/How-to-make-a-newsletter-for-a-Jekyll-blog.html"><![CDATA[<p>This is one of the most overly complex and undocumented jekyll problems I’ve come across so far (apart from pagination - but I try to block that out of my memory). I’ll try to make this short and easy to follow, but no promises.</p>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="http://localhost:4000/feed.xml" rel="self" type="application/atom+xml" /><link href="http://localhost:4000/" rel="alternate" type="text/html" /><updated>2024-12-16T16:00:19+00:00</updated><id>http://localhost:4000/feed.xml</id><entry><title type="html">How to make a newsletter for a jekyll blog</title><link href="http://localhost:4000/posts/How-to-make-a-newsletter-for-a-Jekyll-blog.html" rel="alternate" type="text/html" title="How to make a newsletter for a jekyll blog" /><published>2024-12-12T00:00:00+00:00</published><updated>2024-12-12T00:00:00+00:00</updated><id>http://localhost:4000/posts/How%20to%20make%20a%20newsletter%20for%20a%20Jekyll%20blog</id><content type="html" xml:base="http://localhost:4000/posts/How-to-make-a-newsletter-for-a-Jekyll-blog.html"><![CDATA[<p>This is one of the most overly complex and undocumented jekyll problems I’ve come across so far (apart from pagination - but I try to block that out of my memory). I’ll try to make this short and easy to follow, but no promises.</p>

<h3 id="step-1---install-jekyll-feed">Step 1 - Install <code class="language-plaintext highlighter-rouge">jekyll-feed</code></h3>

Expand Down

0 comments on commit 38ea030

Please sign in to comment.