Jekyll 未在 _site 文件夹中创建 post 目录
Jekyll not creating the post directory in _site folder
可能是我的问题接近[这个问题][1]。但是,那里提出的解决方案对我不起作用。因此,在这里创建一个新问题。
我的 config.yml
看起来如下:
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# Site settings
title: Some title ..
author1: Alice
author2: Bob
author_link1: https://www.facebook.com/alice
author_link2: https://www.facebook.com/bob
author_description: Alice and Bob's cool site
email: your-email@domain.com
description: > # this means to ignore newlines until "baseurl:"
Some lines and dots in the end.......
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://example.com" # the base hostname & protocol for your site
# Picturefill
# A responsive image polyfill: http://scottjehl.github.io/picturefill/
picturefill: false
# Typography
# To use, publish a kit and enter the ID here. If you do not wish to use Typekit,
# leave this ID blank
typekit_kit_id:
# Build settings
gems: [jekyll-paginate]
markdown: kramdown
permalink: pretty
# Pagination
paginate: 5
# Sass
sass:
style: :compressed
#This is to include future posts. Without this if a post is of future date, Jekyll will fail
future: true
jekyll build --verbose
的输出如下:
Logging at level: debug
Configuration file: /home/alice/Downloads/website/_config.yml
Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.
Requiring: jekyll-paginate
Requiring: kramdown
Source: /home/alice/Downloads/awesome-site
Destination: /home/alice/Downloads/awesome-site/_site
Incremental build: disabled. Enable with --incremental
Generating...
EntryFilter: excluded /Gemfile.lock
EntryFilter: excluded /Gemfile
Reading: _posts/2018-04-09-awesome.markdown
Generating: Jekyll::Paginate::Pagination finished in 0.00028435 seconds.
Rendering: _posts/2018-04-09-awesome.markdown
Pre-Render Hooks: _posts/2018-04-09-awesome.markdown
Rendering Liquid: _posts/2018-04-09-awesome.markdown
Rendering Markup: _posts/2018-04-09-awesome.markdown
Requiring: kramdown
Rendering Layout: _posts/2018-04-09-awesome.markdown
Rendering: _posts/2018-04-09-awesome.markdown
Pre-Render Hooks: _posts/2018-04-09-awesome.markdown
Rendering Liquid: _posts/2018-04-09-awesome.markdown
Rendering Markup: _posts/2018-04-09-awesome.markdown
Rendering: feed.xml
Pre-Render Hooks: feed.xml
Rendering Liquid: feed.xml
Rendering Markup: feed.xml
Rendering Layout: feed.xml
Rendering: index.html
Pre-Render Hooks: index.html
Rendering Liquid: index.html
Rendering Markup: index.html
Rendering Layout: index.html
Rendering: css/screen.scss
Pre-Render Hooks: css/screen.scss
Rendering Liquid: css/screen.scss
Rendering Markup: css/screen.scss
done in 0.088 seconds.
Auto-regeneration: disabled. Use --watch to enable.
唯一post2018-04-09-awesome.markdown
包含以下内容
---
layout: page
title: "Our page"
date: 2018-04-09
categories:
location:
---
Some content
另外,_includes/post.html
文件有一个与日期有关的注释行。但是,我希望这不会导致问题。
<article class="post">
<header>
<a href="{{ include.post.url | prepend: site.baseurl }}">
<h1 class="post-title">{{ include.post.title }}</h1>
</a>
<!-- <time datetime="{{ include.post.date | date_to_xmlschema }}" class="post-date">{{ include.post.date | date: "%A, %B %-d, %Y" }}</time> -->
<time class="post-date"> Alice and Bob's cool website </time>
</header>
<div class="post-body">
{% if include.post.location %}<a href="https://www.google.com/maps/search/{{ include.post.location }}" target="_blank" class="post-body-location">{{ include.post.location }}</a><span class="post-body-location-divider">—</span>{% endif %}{{ include.content }}
</div>
<footer class="post-footer">
{% if include.post.location %}<a href="https://www.google.com/maps/search/{{ include.post.location }}" target="_blank" class="post-footer-location">{{ include.post.location }}</a>{% endif %}
</footer>
</article>
我哪里做错了?如何解决这个问题?我试图在 Github 上托管它,但构建失败了。我相信,没有 _post 文件夹是构建失败的原因之一。
虽然父文件夹有以下文件夹和文件,
CNAME _config.yml css feed.xml Gemfile Gemfile.lock img _includes index.html js _layouts LICENSE _posts README.md _sass _site
_site 文件夹只有以下内容。
2018 CNAME css feed.xml img index.html js LICENSE README.md
我相信,有什么不对吗?
任何帮助将不胜感激。
这里一切正常
Jekyll 正在生成 posts 并将 permalink: pretty
设置为配置 (see documentation)。
这意味着 post 在 _posts/2018-04-09-awesome.markdown 将有一个 url遵循/:categories/:year/:month/:day/:title/
模式,将在2018/04/09/awesome/index.html.
生成
可能是我的问题接近[这个问题][1]。但是,那里提出的解决方案对我不起作用。因此,在这里创建一个新问题。
我的 config.yml
看起来如下:
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# Site settings
title: Some title ..
author1: Alice
author2: Bob
author_link1: https://www.facebook.com/alice
author_link2: https://www.facebook.com/bob
author_description: Alice and Bob's cool site
email: your-email@domain.com
description: > # this means to ignore newlines until "baseurl:"
Some lines and dots in the end.......
baseurl: "" # the subpath of your site, e.g. /blog
url: "http://example.com" # the base hostname & protocol for your site
# Picturefill
# A responsive image polyfill: http://scottjehl.github.io/picturefill/
picturefill: false
# Typography
# To use, publish a kit and enter the ID here. If you do not wish to use Typekit,
# leave this ID blank
typekit_kit_id:
# Build settings
gems: [jekyll-paginate]
markdown: kramdown
permalink: pretty
# Pagination
paginate: 5
# Sass
sass:
style: :compressed
#This is to include future posts. Without this if a post is of future date, Jekyll will fail
future: true
jekyll build --verbose
的输出如下:
Logging at level: debug
Configuration file: /home/alice/Downloads/website/_config.yml
Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.
Requiring: jekyll-paginate
Requiring: kramdown
Source: /home/alice/Downloads/awesome-site
Destination: /home/alice/Downloads/awesome-site/_site
Incremental build: disabled. Enable with --incremental
Generating...
EntryFilter: excluded /Gemfile.lock
EntryFilter: excluded /Gemfile
Reading: _posts/2018-04-09-awesome.markdown
Generating: Jekyll::Paginate::Pagination finished in 0.00028435 seconds.
Rendering: _posts/2018-04-09-awesome.markdown
Pre-Render Hooks: _posts/2018-04-09-awesome.markdown
Rendering Liquid: _posts/2018-04-09-awesome.markdown
Rendering Markup: _posts/2018-04-09-awesome.markdown
Requiring: kramdown
Rendering Layout: _posts/2018-04-09-awesome.markdown
Rendering: _posts/2018-04-09-awesome.markdown
Pre-Render Hooks: _posts/2018-04-09-awesome.markdown
Rendering Liquid: _posts/2018-04-09-awesome.markdown
Rendering Markup: _posts/2018-04-09-awesome.markdown
Rendering: feed.xml
Pre-Render Hooks: feed.xml
Rendering Liquid: feed.xml
Rendering Markup: feed.xml
Rendering Layout: feed.xml
Rendering: index.html
Pre-Render Hooks: index.html
Rendering Liquid: index.html
Rendering Markup: index.html
Rendering Layout: index.html
Rendering: css/screen.scss
Pre-Render Hooks: css/screen.scss
Rendering Liquid: css/screen.scss
Rendering Markup: css/screen.scss
done in 0.088 seconds.
Auto-regeneration: disabled. Use --watch to enable.
唯一post2018-04-09-awesome.markdown
包含以下内容
---
layout: page
title: "Our page"
date: 2018-04-09
categories:
location:
---
Some content
另外,_includes/post.html
文件有一个与日期有关的注释行。但是,我希望这不会导致问题。
<article class="post">
<header>
<a href="{{ include.post.url | prepend: site.baseurl }}">
<h1 class="post-title">{{ include.post.title }}</h1>
</a>
<!-- <time datetime="{{ include.post.date | date_to_xmlschema }}" class="post-date">{{ include.post.date | date: "%A, %B %-d, %Y" }}</time> -->
<time class="post-date"> Alice and Bob's cool website </time>
</header>
<div class="post-body">
{% if include.post.location %}<a href="https://www.google.com/maps/search/{{ include.post.location }}" target="_blank" class="post-body-location">{{ include.post.location }}</a><span class="post-body-location-divider">—</span>{% endif %}{{ include.content }}
</div>
<footer class="post-footer">
{% if include.post.location %}<a href="https://www.google.com/maps/search/{{ include.post.location }}" target="_blank" class="post-footer-location">{{ include.post.location }}</a>{% endif %}
</footer>
</article>
我哪里做错了?如何解决这个问题?我试图在 Github 上托管它,但构建失败了。我相信,没有 _post 文件夹是构建失败的原因之一。
虽然父文件夹有以下文件夹和文件,
CNAME _config.yml css feed.xml Gemfile Gemfile.lock img _includes index.html js _layouts LICENSE _posts README.md _sass _site
_site 文件夹只有以下内容。
2018 CNAME css feed.xml img index.html js LICENSE README.md
我相信,有什么不对吗?
任何帮助将不胜感激。
这里一切正常
Jekyll 正在生成 posts 并将 permalink: pretty
设置为配置 (see documentation)。
这意味着 post 在 _posts/2018-04-09-awesome.markdown 将有一个 url遵循/:categories/:year/:month/:day/:title/
模式,将在2018/04/09/awesome/index.html.