【发布时间】:2017-04-27 01:58:48
【问题描述】:
我的远程存储库已更新,但我的 Github 页面站点不会更新。 http://balassit.github.io/readings/GitNotes.md 的内容已过时。我已经验证了在我的 Github 设置中,我的网站是从 master 构建的。 master 上的内容与我的本地分支是最新的。
我使用jekyll build 和jekyll serve 在本地运行我的网站。这会在 localhost:4000 上产生预期的输出。
我看过一些帖子,因为 kramdown 格式,markdown 在 jekyll 页面中呈现问题,但这对我来说似乎不是问题。
https://github.com/balassit/balassit.github.io/tree/master
GitNotes.html YAML 块
---
layout: markdown
title: "Readings"
id: "readings"
custom_css: readings/github-markdown.css
---
github-markdown.css 来自https://github.com/sindresorhus/github-markdown-css/blob/gh-pages/github-markdown.css
head.html
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{ site.baseurl }}/css/normalize.css">
<link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
<!-- Custom CSS and JavaScript -->
{% for css_file in page.custom_css %}
<link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/{{ css_file }}">
{% endfor %}
{% for js_file in page.custom_js %}
<script src="{{ site.baseurl }}/{{ js_file }}"></script>
{% endfor %}
{% for js_file in page.source_js %}
<script src="{{ js_file }}"></script>
{% endfor %}
<title>{{ page.title }}</title>
</head>
markdown.html
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 1080px;
padding: 45px;
}
</style>
{% include header.html %}
{% include sidebar.html %}
<main>
<article class="markdown-body">
<markdown>
{{ content }}
</markdown>
</article>
</main>
{% include footer.html %}
<script src="https://spikespaz.github.io/tagdownjs/scripts/tagdown.min.js"></script>
</body>
</html>
底部脚本是tagdown的,可以在http://spikespaz.com/tagdownjs/看到
【问题讨论】:
标签: markdown jekyll github-pages