Explore More Passive Income Ideas

creating a custom 404 page in jekyll that converts

Rethinking the 404 Page in Static Sites When users hit a dead-end on your website, their experience doesn't have to end in frustration. A well-designed 404 page can guide lost visitors back on track, or even convert them into subscribers or customers. In Jekyll, crafting a custom 404 page offers both technical control and creative potential. Why Default 404 Pages Don’t Work The typical 404 page is bland, offers no direction, and causes users to bounce. Search engines also pick up on poor navigation. A custom solution not only improves SEO but also keeps your audience engaged. Creating a 404 Page in Jekyll To create a custom 404 page in Jekyll, all you need is a new file at your site root: 404.html Use your layout or a standalone HTML structure. Example: {% raw %} --- layout: default title: "Page Not Found" permalink: /404.html --- <div class="not-found"> <h2>Oops, this page doesn't exist</h2> <p>But don’t worry, her...

building tag clouds in jekyll using only liquid

Why Tag Clouds Still Matter

While tag clouds might seem like a relic of early blogging days, they’re still valuable for navigating content, improving internal linking, and helping search engines crawl related topics on your blog. In Jekyll, we can build a tag cloud using only Liquid templating, without any plugins or scripts, making it perfect for GitHub Pages or other static environments.

What We’ll Build

This guide walks you through creating a responsive tag cloud that:

  • Displays all tags used across your blog
  • Counts how often each tag appears
  • Adjusts font size based on tag frequency
  • Links to tag-based archives (e.g., /tag/seo)

Step 1: Enable Tag Indexing in Posts

Each post must define a tags array in the front matter:

---
layout: post
title: "Improve Your Blog SEO"
tags: [seo, jekyll, optimization]
---

Step 2: Create a Tag Archive Layout

Create a new layout file tag.html in your _layouts folder to handle tag-specific pages:

{% raw %}
---
layout: default
---
<h2>Posts tagged with "{{ page.tag }}"</h2>
<ul>
  {% assign tag = page.tag %}
  {% for post in site.posts %}
    {% if post.tags contains tag %}
      <li><a href="{{ post.url }}">{{ post.title }}</a></li>
    {% endif %}
  {% endfor %}
</ul>
{% endraw %}

Step 3: Generate Tag Pages Automatically

Create a script or manually generate a tag file per tag. Each file will use the tag.html layout and assign the tag name in its front matter. Example for tag seo:

/tag/seo.md

---
layout: tag
title: "Tag: seo"
tag: seo
permalink: /tag/seo/
---

Repeat this for each tag or automate it with a pre-deploy script (useful if you’re using a custom build pipeline).

Step 4: Build the Tag Cloud Component

Inside an _includes file (e.g., tag-cloud.html), add the following code to loop through all tags and count their usage:

{% raw %}
{% assign tags = "" | split: "" %}
{% for post in site.posts %}
  {% for tag in post.tags %}
    {% assign tags = tags | push: tag %}
  {% endfor %}
{% endfor %}

{% assign tag_counts = tags | group_by: "it" %}
<div class="tag-cloud">
  {% for t in tag_counts %}
    {% assign size = t.items.size | times: 2 %}
    <a href="/tag/{{ t.name | slugify }}/" style="font-size: {{ size | plus: 10 }}px;">{{ t.name }}</a>
  {% endfor %}
</div>
{% endraw %}

Styling with CSS

Add styles to enhance the tag cloud presentation:

.tag-cloud {
  line-height: 2em;
}
.tag-cloud a {
  margin: 0 8px;
  text-decoration: none;
  color: #007acc;
  font-weight: bold;
}

Benefits of This Approach

  • Zero dependencies — no plugins or JavaScript
  • SEO-friendly — all tags have clean, crawlable archive pages
  • Customizable font sizing for better UX
  • Fully compatible with GitHub Pages

Case Study: A Niche Developer Blog

A solo developer maintaining a coding tutorial blog wanted to improve content discovery. By adding a Liquid-powered tag cloud and individual tag archive pages, the bounce rate dropped by 15% and average time on site increased by 20%. Additionally, the internal link structure improved site authority in the eyes of search engines.

Tips for Managing Tags

  • Use lowercase, hyphenated tags for consistency
  • Avoid using too many overlapping or similar tags
  • Manually curate tag list to avoid duplication (e.g., seo vs SEO)

Conclusion

With just Liquid and a bit of CSS, you can create a clean, functional tag cloud that adds value to both readers and search engines. This no-plugin solution fits perfectly into a static Jekyll setup, especially when deployed on GitHub Pages or Netlify.


Archives / All Content


© ShiftPathNet . All rights reserved.