【发布时间】:2014-10-31 14:18:39
【问题描述】:
我正在尝试在我的 Jekyll 网站中使用这样的结构:
_posts
php
2014-10-31-this-is-a-test.md
ruby
2014-12-01-some-other-test.md
我希望php 目录中的所有帖子都属于PHP 类别,并且ruby 中的所有帖子都属于Ruby 类别。这是我的_config.yml 文件:
defaults:
-
scope:
path: ""
type: "posts"
values:
layout: post
comments: true
share: true
-
scope:
path: "_posts/php"
type: "posts"
values:
category: PHP
-
scope:
path: "_posts/ruby"
type: "posts"
values:
category: Ruby
但是,这不起作用。有什么想法吗?
【问题讨论】:
标签: jekyll github-pages