Skip to content

Instantly share code, notes, and snippets.

View pizn's full-sized avatar
🎯
Focusing

.ッ掌心、 pizn

🎯
Focusing
View GitHub Profile
@pizn
pizn / index.html
Created December 7, 2012 02:50
index.html
---
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 %}
@pizn
pizn / default.html
Created December 7, 2012 02:46
default.html
<!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>
@pizn
pizn / category_index.html
Created February 24, 2012 08:50
category layout for jekyll blog
---
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">
@pizn
pizn / category_plugin.rb
Created February 24, 2012 08:47
category plugin for jekyll blog
module Jekyll
class CategoryIndex < Page
def initialize(site, base, dir, category)
@site = site
@base = base
@dir = dir
@name = 'index.html'
self.process(@name)
@pizn
pizn / gist:1221438
Created September 16, 2011 07:27
wordpress 常用函数
//语言和编码
<?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() ) ) //如果是首页,则输出博客名称和描述