【问题标题】:GitHub Pages - frontmatter causes page to breakGitHub Pages - frontmatter 导致页面中断
【发布时间】:2017-05-13 18:14:31
【问题描述】:

我正在按照https://github.com/blog/2228-simpler-github-pages-publishing 发布我的/docs 文件夹中的页面

如果我在页面上包含这个头条内容,构建就会中断。

---
layout: page
title: "Help Page"
permalink: /help
---

页面已构建,但仅包含来自 <body> 元素的数据。没有标题,没有样式表,只是乱码的 HTML。如果我使用layout: post,也会发生同样的情况。

如果我删除了layout: page 行,那么一切正常。

根据 GitHub 文档 - https://help.github.com/articles/configuring-jekyll/ - 我应该能够在我的页面中使用这个 frontmatter。

我错过了什么明显的东西?

【问题讨论】:

    标签: jekyll github-pages yaml-front-matter


    【解决方案1】:

    “slate”主题只有“默认”布局。

    所以切换到layout: default 解决了这些问题。

    【讨论】:

      猜你喜欢
      • 2020-03-13
      • 2017-02-18
      • 2015-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多