This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
title: Liaa's | |
--- | |
{% for post in site.posts %} | |
<li>{{ post.date | date_to_string }} <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li> | |
{% endfor %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>{% if page.title %}{{ page.title }}</title> | |
<link rel="stylesheet" href="/css/custom.css" type="text/css" /> | |
</head> | |
<body> | |
{{ content }} | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
--- | |
<!-- | |
这里是 category_index.html 文件,里面使用到的一些 DOM 结构依赖 pizn.me 的样式。但您可以只参考里面的 jekyll 语法就好。这里的作用是显示出 category 分类列表。 | |
--> | |
<section class="content fn-clear"> | |
<div class="content-cnt"> | |
<div class="ui-grid-25 ui-grid-right content-top"> | |
<section class="ui-grid-19 violet-post"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Jekyll | |
class CategoryIndex < Page | |
def initialize(site, base, dir, category) | |
@site = site | |
@base = base | |
@dir = dir | |
@name = 'index.html' | |
self.process(@name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//语言和编码 | |
<?php language_attributes(); ?> //语言属性 | |
//根据不同情况来读取 title | |
<?php | |
global $page, $pages; | |
wp_title( '|', true, 'right'); //在标题的左方或右方 | |
bloginfo( 'name' ); //博客的名称 | |
$site_description = get_bloginfo( 'description', 'Display' ); //博客的描述 | |
if( $site_description && ( is_home() || is_front_page() ) ) //如果是首页,则输出博客名称和描述 |