Skip to content

Instantly share code, notes, and snippets.

@jetzhliu
Last active August 29, 2015 14:07
Show Gist options
  • Save jetzhliu/19981f1ec5e89453e638 to your computer and use it in GitHub Desktop.
Save jetzhliu/19981f1ec5e89453e638 to your computer and use it in GitHub Desktop.
文章元数据

Predefined Global Variables 预定义全局量

VARIABLE DESCRIPTION
layout If set, this specifies the layout file to use. Use the layout file name without the file extension. Layout files must be placed in the _layouts directory.
permalink If you need your processed blog post URLs to be something other than the default /year/month/day/title.html then you can set this variable and it will be used as the final URL.
published Set to false if you don’t want a specific post to show up when the site is generated.
category categories Instead of placing posts inside of folders, you can specify one or more categories that the post belongs to. When the site is generated the post will act as though it had been set with these categories normally. Categories (plural key) can be specified as a YAML list or a space-separated string.
tags Similar to categories, one or multiple tags can be added to a post. Also like categories, tags can be specified as a YAML list or a space- separated string.

Predefined Variables for Posts

VARIABLE DESCRIPTION
date A date here overrides the date from the name of the post. This can be used to ensure correct sorting of posts.

Custom Variables

使用方式 {{ page.title }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment