ruby seo

Modify Jekyll Article Title Format to Include Site Title

This article introduces how to modify Jekyll article titles to 'Page Title - Site Title'. Jekyll's default article title is 'Page Title', but we'll change it to the WordPress-like 'Page Title - Site Title' style... Liquid syntax is unique, so it's a bit difficult to get used to...

Shou Arisaka
1 min read
Oct 7, 2025

This article introduces how to modify Jekyll article titles to “Page Title - Site Title”.

Jekyll seems to adopt a template engine called Liquid instead of ERB. Liquid syntax is unique, so it’s a bit difficult to get used to, but the functionality itself is minimal, so there’s not much to memorize.

Jekyll’s default article title is “Page Title”, but we’ll change it to the WordPress-like “Page Title - Site Title” style.

Edit _includes/head.html.

<title><br />
  {% if page.title %}<br />
    {% capture new_title %}{{ page.title }} - {{ site.title }}{% endcapture %}<br />
    {{ new_title }}<br />
  {% else %}<br />
    {{ site.title }}<br />
  {% endif %}<br />
</title>

Inline version

<title>{% if page.title %}{% capture new_title %}{{ page.title }} << YAYB {% endcapture %}{{ new_title }}{% else %}{{ site.title }}{% endif %}</title>

Share this article

Shou Arisaka Oct 7, 2025

🔗 Copy Links