Improving Search Engine Optimization
As the final step in this very small series I tried improving the SEO (search engine optimization) score for my start page. I started out with a good score of 92. As usual, my goal was 100.
Links
As a first step I had to fix a broken link in one of my articles. One forgottenhref
in a post needed to be fixed. Fixing this issue did not change the score.
Meta description
The start page didn’t have an HTML meta description, so I added one. I followed the best practices outlined here.- Use a unique description for each page
- Clear and concise descriptions
- Avoid keyword stuffing
- No complete sentences needed, can be structured data
<meta name="description" content="...">
{% case page.layout %}
{% when "post" %}
{% if page.meta_description == nil %}
{% assign meta_description = page.excerpt | strip_html | strip_newlines | truncate: 160, "... read more" %}
{% else %}
{% assign meta_description = page.meta_description %}
{% endif %}
{% when "page" %}
{% unless page.meta_description == nil %}
{% assign meta_description = page.meta_description %}
{% endunless %}
{% else %}
{% assign meta_description = site.meta_description %}
{% endcase -%}
{% unless meta_description == nil %}
<meta name="description" content="{{ meta_description }}">
{% endunless -%}
