jekyll/jekyll-seo-tag

Couldn't locate where to add in {% seo %}

LilianYou opened this issue · 5 comments

Dear experts,

Please excuse me if this question sounds naive. I am new to webpage development and I am following the instructions on this repo jekyll-seo-tag to add in the SEO tag. However, for step 3, I can not locate a file in my folder where I could add in {% seo %}. I attached a screenshot of all the files in my web folder below, could you please point me to the right direction?

Thanks,
Lily
Screen Shot 2020-09-28 at 12 16 57 AM

ialja commented

You should include it in the file where the <head> element is defined, usually it will be in /_includes/head.html. Just be sure to add it before the closing </head> tag.

Hi: Here is my head.html file which does not have stage. Please see below. Is there any alternative solution? Thanks.

Screen Shot 2020-10-16 at 3 03 41 AM

@LilianYou What are the contents of _includes/seo.html?

Here it is. It comes with the template I think.

Screen Shot 2020-10-16 at 3 57 25 AM

Okay. So, your theme is already equipped to render metadata for SEO. But if you need the markup provided by this plugin
(jekyll-seo-tag), then simply replace the {% include seo.html %} at line 5 of _includes/head.html with {% seo %}:

- {% include seo.html %}
+ {% seo %}