title | layout |
---|---|
Jekyll |
default |
$ gem install jekyll
_config.yml
_drafts/
_includes/
header.html
footer.html
_layouts/
default.html
_posts/
2013-09-02-hello.md
_site/
...
---
layout: post
title: Hello
---
permalink: '/hello'
published: false
category: apple
categories: ['html', 'css']
tags: ['html', 'css']
source: .
destination: _site
exclude: [dir, file, ...]
include: ['.htaccess']
{\{ site }} - from config.yml
{\{ page }} - from frontmatter, and page-specific info
{\{ content }} - html content (use in layouts)
{\{ paginator }} - ...
{\{ site.time }} - current time
{\{ site.pages }} - list of pages
{\{ site.posts }} - list of posts
{\{ site.related_posts }} - list
{\{ site.categories.CATEGORY }} - list
{\{ site.tags.TAG }} - list
{\{ page.content }} - un-rendered content
{\{ page.title }}
{\{ page.excerpt }} - un-rendered excerpt
{\{ page.url }}
{\{ page.date }}
{\{ page.id }}
{\{ page.categories }}
{\{ page.tags }}
{\{ page.path }}
{\{ paginator.per_page }}
{\{ paginator.posts }}
...
{\% for post in site.posts %}
<a href="{{ post.url }}">
<h2>{\{ post.title }} — {\{ post.date | date_to_string }}</h2>
</a>
{\{ post.content }}
{\% endfor %}
{\{ page.date | date: "%b %d, %Y" }}
{\% if page.image.feature %}
{\% else %}
{\% endif %}
{\% include header.html %}
# _plugins/bundler.rb
require "bunder/setup"
Bundler.require :default