From e22175b12176d4a6bf543355951add4fd090d081 Mon Sep 17 00:00:00 2001 From: "Han Verstraete (OpenFaaS Ltd)" Date: Wed, 23 Oct 2024 16:42:53 +0200 Subject: [PATCH] Auto generate blog rollup Set rollup to true in a post front matter to include it the the recent publications section in the home page. The last 3 most recent posts with this value set will get displayed there. The optional category field can be set and will be displayed above the post. Signed-off-by: Han Verstraete (OpenFaaS Ltd) --- _includes/rollup.html | 73 ++++++++ _includes/tutorials.html | 157 ------------------ _plugins/capitalize_filter.rb | 10 ++ .../2024-09-02-highly-available-tunnels.md | 2 + ...-client-ips-ingress-nginx-caddy-traefik.md | 2 + .../2024-10-17-ssh-with-inlets-cloud.md | 2 + index.html | 2 +- 7 files changed, 90 insertions(+), 158 deletions(-) create mode 100644 _includes/rollup.html delete mode 100644 _includes/tutorials.html create mode 100644 _plugins/capitalize_filter.rb diff --git a/_includes/rollup.html b/_includes/rollup.html new file mode 100644 index 0000000..da7940f --- /dev/null +++ b/_includes/rollup.html @@ -0,0 +1,73 @@ + +
+
+
+

+ Recent publications +

+

+ Read tutorials, watch videos and catch up on new features from the + inlets community. +

+
+ +
+ {% assign rollup_posts = site.posts | where_exp: "post", "post.rollup == true" | sort: 'date' | reverse | slice: 0, 3 %} + {% if rollup_posts.size > 0 %} + {% for post in rollup_posts %} +
+ {% if post.category %} +
+
+ + {{ post.category | capitalize_first }} + +
+
+ {% endif %} + +

{{ post.title }}

+

{{ post.description }}

+
+
+ {% if post.author %} +
+ {{ post.author }} +
+ {% endif %} + +
+

{{ post.author }}

+
+ +
+
+
+
+ {% endfor %} + {% endif %} +
+ + +
+
diff --git a/_includes/tutorials.html b/_includes/tutorials.html deleted file mode 100644 index 007eb76..0000000 --- a/_includes/tutorials.html +++ /dev/null @@ -1,157 +0,0 @@ - - \ No newline at end of file diff --git a/_plugins/capitalize_filter.rb b/_plugins/capitalize_filter.rb new file mode 100644 index 0000000..fdf2536 --- /dev/null +++ b/_plugins/capitalize_filter.rb @@ -0,0 +1,10 @@ +module Jekyll + module CapitalizeFilter + def capitalize_first(input) + input.capitalize + end + end +end + +Liquid::Template.register_filter(Jekyll::CapitalizeFilter) + \ No newline at end of file diff --git a/blog/_posts/2024-09-02-highly-available-tunnels.md b/blog/_posts/2024-09-02-highly-available-tunnels.md index 80becb4..1a7fd22 100644 --- a/blog/_posts/2024-09-02-highly-available-tunnels.md +++ b/blog/_posts/2024-09-02-highly-available-tunnels.md @@ -4,6 +4,8 @@ title: Create Highly Available Tunnels With A Load Balancer description: Learn how to create a highly available inlets tunnel with a load balancer, and Proxy Protocol support, to get source IP addresses. author: Alex Ellis tags: ha architecture reference load-balancer +category: tutorial +rollup: true author_img: alex image: /images/2024-09-ha-tunnels/background.png date: 2024-09-02 diff --git a/blog/_posts/2024-10-08-real-client-ips-ingress-nginx-caddy-traefik.md b/blog/_posts/2024-10-08-real-client-ips-ingress-nginx-caddy-traefik.md index f76cf46..c306318 100644 --- a/blog/_posts/2024-10-08-real-client-ips-ingress-nginx-caddy-traefik.md +++ b/blog/_posts/2024-10-08-real-client-ips-ingress-nginx-caddy-traefik.md @@ -4,6 +4,8 @@ title: Get Real Client IPs with Ingress Nginx, Caddy or Traefik description: Whether you're running a reverse proxy directly on a host, or an Ingress Controller in Kubernetes, you can get the real client IP with inlets. author: Alex Ellis tags: load-balancer ingress-controller reverse-proxy proxy-protocol +category: tutorial +rollup: true author_img: alex image: /images/2024-10-real-ips/background.png date: 2024-10-08 diff --git a/blog/_posts/2024-10-17-ssh-with-inlets-cloud.md b/blog/_posts/2024-10-17-ssh-with-inlets-cloud.md index 512f5ff..6c8ce82 100644 --- a/blog/_posts/2024-10-17-ssh-with-inlets-cloud.md +++ b/blog/_posts/2024-10-17-ssh-with-inlets-cloud.md @@ -4,6 +4,8 @@ title: SSH Into Any Private Host With Inlets Cloud description: Inlets Cloud is a SaaS hosted version of inlets that can give you SSH access to any host on your network. author: Alex Ellis tags: ssh remoteaccess inletscloud support +category: tutorial +rollup: true author_img: alex image: /images/2024-10-inlets-cloud-ssh/background.jpg date: 2024-10-17 diff --git a/index.html b/index.html index 3eb5149..3d3d942 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ --- {% include hero.html %}
-{% include tutorials.html %} +{% include rollup.html %}
{% include features.html %}