ayushiiiiii thakur manataudapat hot momycarterx ifa thanyanan bow porn myvonnieta xx freeshzzers2 mae de familia danca marikamilkers justbeemma sex laprima melina12 thenayav mercury thabaddest giovamend 1 naamabelleblack2 telegram sky8112n2 millastarfatass 777sforest instagram 777sforest watch thickwitjade honeybuttercrunchh ariana twitter thenayav instagram hoelykwini erome andreahascake ifa marceladiazreal christy jameau twitter lolita shandu erome xolier alexsisfay3 anya tianti telegram lagurlsugarpear xjuliaroza senpaixtroll tits huynhjery07 victoria boszczar telegram cherrylids (cherrylidsss) latest phakaphorn boonla claudinka fitsk freshzzers2 anjayla lopez (anjaylalopez) latest bossybrasilian erome euyonagalvao anniabell98 telegram mmaserati yanerivelezec moodworldd1 daedotfrankyloko ketlin groisman ifa observinglalaxo twitter lexiiwiinters erome cherrylidsss twitter oluwagbotemmy emmy  tits xreindeers (xreindeers of) latest ashleyreelsx geizyanearruda ingrish lopez telegram camila1parker grungebitties whitebean fer pack cherrylidsss porn lamegfff nnayikaa cherrylidsss paty morales lucyn itsellakaye helohemer2nd itsparisbabyxo bio pocketprincess008 instagram soyannioficial vansessyx xxx morenitadecali1 afrikanhoneys telegram denimslayy erome lamegfff xx miabaileybby erome kerolay chaves ifa xolisile mfeka xxx videos 777sforest free scotchdolly97 reddit thaiyuni porn alejitamarquez ilaydaaust reddit phree spearit p ruth 20116 vansessy lucy cat vanessa reinhardt  alex mucci ifa its federeels anoushka1198 mehuly sarkar hot lovinggsarahh crysangelvid itskiley x ilaydaaust telegram chrysangellvid prettyamelian parichitanatasha tokbabesreel anastaisiflight telegram thuli phangisile sanjida afrin viral link telegram urcutemia telegram thenayav real name jacquy madrigal telegram carol davhana ayushiiiii thakur geraldinleal1 brenda taveras01 thenayav tiktok vansessyx instagram christy jameau jada borsato reddit bronwin aurora ifa iammthni thiccmamadanni lamegfff telegram josie loli2 nude boobs thenayav sexy eduard safe xreinders jasmineblessedthegoddess tits shantell beezey porn amaneissheree ilaydaaust ifsa lolita shandu xxx oluwagbotemmy erome adelyuxxa amiiamenn cherrylidsss ass daniidg93 telegram desiggy indian food harleybeenz twitter ilaydaust ifsa jordan jiggles sarmishtha sarkar bongonaari shantell beezey twitter sharmistha bongonaari hoelykwini telegram vansessy bae ceeciilu im notannaa tits banseozi i am msmarshaex pinay findz telegram thanyanan jaratchaiwong telegram victoria boszczar xx monalymora abbiefloresss erome akosikitty telegram ilaydaust reddit itsellakaye leaked msmarshaex phreespearit victoria boszczar sexy freshzzers2 2 yvonne jane lmio  huynhjery josie loli2 nu justeffingbad alyxx star world veronicaortiz06 telegram dinalva da cruz vasconcelos twitter fatma ile hertelden ifa telegram christy jameau telegram freehzzers2 meliacurvy nireyh thecherryneedles x wa1fumia erzabeltv freshzzers2 (freshzzers2) latest momycarterx reddit bbybronwin thenayav telegram trendymelanins bebyev21 fridapaz28 helohemer twitter franncchii reddit kikicosta ofcial samanthatrc telegram ninacola reddit fatma ile her telden ifsa telegram momycarterx twitter thenayav free dinalvavasconcelosss twitter dollyflynne reddit valeria obadash telegram nataliarosanews supermommavaleria melkoneko melina kimmestrada19 telegram natrlet the igniter rsa panpasa saeko shantay jeanette  thelegomommy boobs hann1ekin boobs naamabelleblack2 twitter lumomtipsof princesslexi victoria boszczar reddit itsparisbabyxo real name influenciadora de estilo the sims 4 bucklebunnybhadie dalilaahzahara xx scotchdolly97 nanda reyes of theecherryneedles instagram harleybenzzz xx justine joyce dayag telegram viral soyeudimarvalenzuela telegram xrisdelarosa itxmashacarrie ugaface monet zamora reddit twitter fatma ile hertelden ifa eng3ksa peya bipasha only fan premium labella dĂŒĂŒn salonu layla adeline  missfluo samridhiaryal anisa dĂŒĂŒn salonu kiley lossen twitter senpaixtroll chrysangell wika boszczar dinalvavasconcelosss  thaliaajd sitevictoriamatosa blueinkx areta febiola sya zipora iloveshantellb ig itsparisbabyxo ass kara royster and zendaya izakayayaduki anne instagram jacquy madrigal hot hazal çalar reddit capthagod twitter amanda miquilena reddit flirtygemini teas

How to Combine Tags and Categories for Smarter Related Posts in Jekyll


If you’ve already implemented related posts by tags in your GitHub Pages blog, you’ve taken a great first step toward improving content discovery. But tags alone sometimes miss context — for example, two posts might share the same tag but belong to entirely different topic branches. To fix that, you can combine tags and categories into a single scoring system to create smarter, more accurate related post suggestions.

Why Combine Tags and Categories

In Jekyll, both tags and categories are used to describe content, but in slightly different ways:

By combining both, your related posts logic becomes far more contextual. It can prioritize posts that share both a category and tags over those that only share tags, giving you layered relevance.

Building the Smart Matching Logic

Let’s start by creating a Liquid loop that gives each post a “match score” based on overlapping categories and tags. A post sharing both gets a higher score.

Step 1 Define Your Scoring Formula

In this approach, we’ll assign:

This way, Jekyll can rank related posts by how similar they are to the current one.



{% assign related_posts = site.posts | where_exp: "item", "item.url != page.url" %}
{% assign scored = "" %}

{% for post in related_posts %}
  {% assign cat_match = post.categories | intersection: page.categories | size %}
  {% assign tag_match = post.tags | intersection: page.tags | size %}
  {% assign score = cat_match | times: 2 | plus: tag_match %}
  {% if score > 0 %}
    {% capture item %}
      {{ post.url }}::{{ post.title }}::{{ score }}::{{ post.image }}
    {% endcapture %}
    {% assign scored = scored | append: item | append: "|" %}
  {% endif %}
{% endfor %}

This snippet calculates a weighted relevance score for every post that shares at least one tag or category.

Step 2 Sort and Display by Score

Liquid doesn’t directly sort by custom numeric values, but you can achieve it by converting the string into an array and reordering it manually. To keep things simple, we’ll display only the top few posts based on score.



Recommended for You

Each related post now comes with its thumbnail, title, and an implicit relevance score based on shared categories and tags.

Styling the Related Section

You can reuse the same CSS grid used in the previous “related posts with thumbnails” article, or make this version slightly more compact for emphasis on content relationship:


.related-hybrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.related-hybrid li {
  background: #f7f7f7;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.related-hybrid li:hover {
  transform: translateY(-3px);
}

.related-hybrid img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-hybrid span {
  display: block;
  padding: 0.75rem;
  text-align: center;
  color: #333;
  font-size: 0.95rem;
}

Adding Weight Control for SEO Context

You can tweak the scoring weights if your blog emphasizes certain relationships. For example:

Simply adjust the Liquid logic:



{% assign score = cat_match | times: 3 | plus: tag_match %}

This makes categories three times more influential than tags when calculating relevance.

Practical Example

Let’s say you have three posts:

TitleCategoriesTags
Mastering Jekyll SEOjekyll,seooptimization,metadata
Improving Metadata for SEOseometadata,on-page
Building Fast Jekyll Themesjekyllperformance,speed

When viewing “Mastering Jekyll SEO,” the second post shares the seo category and metadata tag, scoring higher than the third post, which only shares the jekyll category. As a result, it appears first in the related section — reflecting better topical relevance.

Handling Posts Without Tags or Categories

If a post doesn’t have any tags or categories, the related section might render empty. To handle that gracefully, add a fallback message:



{% if scored == "" %}
  

No related articles found. Explore our latest posts instead:

{% endif %}

This ensures your layout stays consistent and always offers navigation options to readers.

Combining Smart Matching with Thumbnails

You can enhance this further by mixing the smart scoring logic with the thumbnail display method from the previous tutorial. Add the image variable for each post and include fallback support.



{% assign default_image = "/assets/images/fallback.webp" %}
{{ title }}

This ensures every related post displays a consistent thumbnail, even if the post doesn’t define one.

Performance and Build Efficiency

Since this method uses simple Liquid loops, it doesn’t affect GitHub Pages build times significantly. However, you should:

The final result is a visually engaging, SEO-friendly, and contextually accurate related post system that updates automatically with every new article.

Final Thoughts

By combining tags and categories, you’ve built a smart hybrid related post system that mimics the intelligence of dynamic CMS platforms — entirely within the static simplicity of Jekyll and GitHub Pages. It enhances user experience, internal linking, and SEO authority — all while keeping your blog lightweight and fully static.

Next Step

In the next continuation, we’ll explore how to add JSON-based structured data to your related post section so that Google better understands post relationships and can display enhanced results in SERPs.



.
ads by Adsterra to keep my blog alive









Ad Policy

My blog displays third-party advertisements served through Adsterra. The ads are automatically delivered by Adsterra’s network, and I do not have the ability to select or review each one beforehand. Sometimes, ads may include sensitive or adult-oriented content, which is entirely under the responsibility of Adsterra and the respective advertisers. I sincerely apologize if any of the ads shown here cause discomfort, and I kindly ask for your understanding.