ScottLogic / blog

The Scott Logic blog
http://blog.scottlogic.com
Other
9 stars 85 forks source link

Use tags as page keywords #254

Open chriswilty opened 1 week ago

chriswilty commented 1 week ago

Pretty much every post has some tags defined: this is a built-in variable for post front matter. However, it looks like these are not really being used: not in the rendered page, not in code logic for finding related posts. The only tag that is used is "featured", to make selected posts sticky (on author and category pages).

How about we add tags as keywords to each post? That should help with SEO.

In _layouts/default.html we would add a new meta tag to hold the keywords, something like this:

  {% unless page.tags == empty %}
  <meta name="keywords" content="{{page.tags | join: ' '}}" />
  {% endif %}
ColinEberhardt commented 1 week ago

I think this is worth mocking up to see how it might look - definitely worth considering.