jekyll-seo-tag 在 Github 个页面中不起作用

jekyll-seo-tag doesn't work within Github Pages

所以我在尝试为通过 Github Pages.

提供的简单静态网站添加一些 SEO 优化时遇到了问题

如文档所述:https://help.github.com/articles/search-engine-optimization-for-github-pages/

我创建了 _config.yml 文件,其中包含下一行代码:

plugins:
  - jekyll-seo-tag

并将此文件与我的网站文件一起推送,因此结构看起来像 this

问题是链接到我的网站后,我看到了 output

并且 head 标签包括以下 content

我需要帮助来理解为什么 SEO 插件不起作用。感谢您的所有回复,祝您有愉快的一天!

如果要处理任何文件,必须向其添加 front matter

您的 index.html 必须像 :

---
# even an empty front matter is ok
---
<!DOCTYPE html>
...

David Jacquel 的回答帮助很大,我设法解决了一个问题。更多相关信息:

我必须注入有效的前端内容才能解决问题,例如

---
  layout: main
  title: Cheaterino
---

在那之后我仍然没能解决这个问题,因为我的 index.html 被缩小了 front matter

在我禁用文件缩小后一切正常!

head tag content after plugin worked

非常感谢 David Jacquel!