Pelican Octopress Theme Chinese Edition 皮你看八爪鱼出版社主题中文版
Branch: master
Clone or download
Pull request Compare This branch is 9 commits ahead of duilio:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Octopress Theme for Pelican 中文版

我在我的博客 中使用 pelican-octopress-theme 主题,但我发现它有几个地方不适合中文显示, 有一个更好的做法可以维护一张翻译表,并使用 Ruby 生成的多语言版本,很遗憾我没有这个时间。 于是我直接对此主题进行了以下更改:

  1. 更改了默认字体:
$sans: "Microsoft YaHei", "Optima", sans-serif;
$serif: "Microsoft YaHei", "Baskerville", serif;
$mono: "Consolas", "Courier", monospace;
$heading-font-family: "Microsoft YaHei", "Georgia", "Verdana", sans-serif;
  1. 翻译了 HTML 标签中硬编码的英文为中文。
  2. 更改了主题的名字为: pelican-octopress-theme-cn

由于 pelican 以及 pelican-octopress-theme 的开发并不活跃,所以我这个分支也暂并未考虑实现多语后合并回原来的主分支。

  1. 处理了少量时间的显示方式。


  1. kaFFa fORest:
  2. 期待你的博客使用,如果你 issue 和 pull request


Octopress Theme for Pelican

This is a theme for Pelican that looks like Octopress default theme. I wrote this theme for my personal blog.

Why use this theme?

I really like Octopress default theme, I think is enough pretty and very readable. On the other hand I don't like any of the themes currently available for Pelican. As I'm not able to write a nice theme from scratch I've just copied the Octopress' one.

Why didn't you use Octopress?

I've started writing my blog with Octopress but I haven't found a way to easily have a multi-language blog without hacking more than the time I was planning to spend to setup my blog. You can argue that the time spent to copy the Octopress' theme is more than adding a multi-language feature for Octopress.. I'm not sure of that since I've no idea what kind of changes Octopress required to support multiple language per post.

I've found out that I like more the organization of Pelican: Octopress/Jekyll have a unique repository you have to fork, so its code is mixed with your blog's data. Pelican instead separates the two things. Also Pelican is written in Python that I know way better than Ruby.

The theme is missing XXX

I've started writing this theme just for my blog and my blog required few template pages and few features. If you want to add XXX please be free to fork this repository and submit a pull request, I'll be happy to merge it!


This theme add a nice section on the sidebar with a list of GitHub repositories of the user. You can enable it by using these settings:

  • GITHUB_USER: (required to enable) your username

This theme also allows sharing via Twitter, Google Plus, and Facebook. To enable any of these, use the following settings:

  • TWITTER_USER: (required to enable) your username
  • GOOGLE_PLUS_ID: (required to enable) your ID
  • FACEBOOK_LIKE: (required to enable) True

Extra Twitter options (default values are shown):

  • TWITTER_WIDGET_ID: (required to enable feed) ID obtained from twitter settings
  • TWITTER_TWEET_BUTTON: False show twitter tweet button
  • TWITTER_FOLLOW_BUTTON: False show twitter follow button
  • TWITTER_TWEET_COUNT: 3 number of latest tweets to show
  • TWITTER_SHOW_REPLIES: 'false' whether to list replies among latest tweets
  • TWITTER_SHOW_FOLLOWER_COUNT: 'true' show number of followers

Extra google plus options (default values are shown):

  • GOOGLE_PLUS_ONE: False show +1 button
  • GOOGLE_PLUS_HIDDEN: False hide the google plus sidebar link.

Google Analytics

  • GOOGLE_ANALYTICS: "UA-XXXX-YYYY" to activate Google Analytics(classic)
  • GOOGLE_UNIVERSAL_ANALYTICS: "UA-XXXX-Y" to activate Google Universal Analytics
  • GOOGLE_UNIVERSAL_ANALYTICS_COOKIEDOMAIN: 'auto' optional cookie domain setting for Google Universal Analytics
  • GOOGLE_ANALYTICS_DISPLAY_FEATURES: True to enable Display Advertiser Features. This setting works for both Classic Analytics and Universal Analytics.

Sidebar image

  • SIDEBAR_IMAGE: Adds specified image to sidebar. Example value: "images/author_photo.jpg"
  • SIDEBAR_IMAGE_ALT: Alternative text for sidebar image
  • SIDEBAR_IMAGE_WIDTH: Width of sidebar image
  • SEARCH_BOX: set to true to enable site search box
  • SITESEARCH: [default: ''] search engine to which search form should be pointed (optional)

QR Code generation

  • QR_CODE: set to true to enable the qr code generation for articles and pages by browser

FeedBurner integration

  • FEED_FEEDBURNER: set this to the part of your FeedBurner URL after the to set the displayed feed URL to your FeedBurner URL. This also disables generation of the RSS and ATOM tags, regardless of whether you've set the FEED_RSS or FEED_ATOM variables. This way, you can arbitrarily set your generated feed URL while presenting your FeedBurner URL to your users.

Disqus comments

  • DISQUS_SITENAME: (required to enable) set this to the short site identifier of your Disqus site. Example: mrsenko

Isso self-hosted comments

Isso is intended to be a Free replacement for systems like Disqus. Because it is self-hosted, it gives you full control over the comments posted to your website.

  • ISSO_SITEURL: (required to enable) set this to the URL of the server Isso is being served from without a trailing slash. Example:

NOTE: comments are displayed only if the article is not a draft and SITEURL is defined (usually is) and either one of DISQUS_SITENAME or ISSO_SITEURL are defined!

X min read like "X min read" feature. You need to activate the plugin post_stats for this to work (default values are shown):

  • X_MIN_READ: False


  • FAVICON_FILENAME: set to path of your favicon. The default is empty in which case the template will use the hardcoded address favicon.png.

Main Navigation (menu bar)

  • DISPLAY_PAGES_ON_MENU: True show pages
  • DISPLAY_CATEGORIES_ON_MENU: True show categories
  • DISPLAY_FEEDS_ON_MENU: True show feed icons (on the very right side)
  • MENUITEMS: () show static links (before categories)
  • MENUITEMS_MIDDLE: () show static links (between pages and categories) e.g.: MENUITEMS_MIDDLE = ( ('link1', '/static/'), )
  • MENUITEMS_AFTER: () show static links (after categories) e.g.: MENUITEMS_AFTER = ( ('link2', '/static/file2.pdf'), )

Markup for Social Sharing

In order to specify page title, description, image and other metadata for customized social sharing (e.g. Twitter cards), you can add the following metadata to each post:

  • title: The title of the post. This is expected for any post.
  • description: A long form description of the post.
  • social_image: A path to an image, relative to SITEURL. This image
    will show up next to the other information in social shares.
  • twitter_site: A Twitter handle, e.g. @getpelican for the owner
    of the site.
` twitter_creator: A Twitter handle, e.g. @getpelican for the author
of the post.

In addition, you can provide a default post image (instead of setting social_image in the post metadata), by setting SOCIAL_IMAGE in your pelicanconf.

These can be used for social sharing on Google+, Twitter, and Facebook as well as provide more detailed page data for Google Search. In order to enable in each respective channel, your post metadata needs to specify:

  • title: The title of the post. This is expected for any post.
  • use_schema_org: true: For Google and Google+ specific meta tags.
  • use_open_graph: true: For Facebook specific meta tags.
  • use_twitter_card: true: For Twitter specific meta tags.

Archive Title

  • ARCHIVE_TITLE: Custom page title for archives.html. Default is "Blog Archive".


  1. Fork the repository on Github
  2. Send a pull request