From aff31a91eb52d8feccdc0dd0a9a1fd9510a4d0da Mon Sep 17 00:00:00 2001 From: Michael Tang <897425998@qq.com> Date: Fri, 26 Jun 2015 00:16:28 +0800 Subject: [PATCH 01/11] delete " / " --- _config.yml.example | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_config.yml.example b/_config.yml.example index dbe2573..f64d61f 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -1,10 +1,10 @@ # Header menu: Home: / - Archives: /archives - Categories: /categories - Tags: /tags - About: /about + Archives: archives + Categories: categories + Tags: tags + About: about # Content excerpt_link: Read More @@ -41,4 +41,4 @@ favicon: /favicon.png twitter: google_plus: fb_admins: -fb_app_id: \ No newline at end of file +fb_app_id: From 8a5d4e0fa214ef96ee0c59fb650f844c0f4ab868 Mon Sep 17 00:00:00 2001 From: zlargon Date: Sun, 28 Jun 2015 23:32:03 +0800 Subject: [PATCH 02/11] [bug fix] if website is in subdirectory, the 'Logo' will link to wrong url Example: if website is 'xxx.github.io/blog', the 'Logo' will link to 'xxx.github.io/' Solution: replace path '/' to '.' --- README.md | 14 +++++++------- _config.yml.example | 6 +++--- layout/_partial/header.ejs | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index bb7a4c2..ea4a67f 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,11 @@ git pull ```r # Header menu: - Home: / - Archives: /archives - Categories: /categories # -> you need to add extra page to enable this, please see the config below. - Tags: /tags # -> you need to add extra page to enable this, please see the config below. - About: /about + Home: . + Archives: archives + Categories: categories # you need to add extra page to enable this, please see the config below. + Tags: tags # you need to add extra page to enable this, please see the config below. + About: about # Content excerpt_link: Read More @@ -58,7 +58,7 @@ contacts: twitter: '#' facebook: '#' dribbble: '#' - rss: /atom.xml + rss: atom.xml # Links links: @@ -66,7 +66,7 @@ links: # Miscellaneous google_analytics: -favicon: /favicon.png +favicon: favicon.png twitter: google_plus: fb_admins: diff --git a/_config.yml.example b/_config.yml.example index f64d61f..2979a0a 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -1,6 +1,6 @@ # Header menu: - Home: / + Home: . Archives: archives Categories: categories Tags: tags @@ -29,7 +29,7 @@ contacts: twitter: '#' facebook: '#' dribbble: '#' - rss: /atom.xml + rss: atom.xml # Links links: @@ -37,7 +37,7 @@ links: # Miscellaneous google_analytics: -favicon: /favicon.png +favicon: favicon.png twitter: google_plus: fb_admins: diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index c887015..fc376e9 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -1,7 +1,7 @@ \ No newline at end of file + From 9ca2ed1133c05770b3b687e57f375d22a4892046 Mon Sep 17 00:00:00 2001 From: Xiaofeng QU Date: Mon, 6 Jul 2015 11:54:55 +0800 Subject: [PATCH 03/11] Choose a thumbnail from the photos of the post without thumbnail and banner Signed-off-by: Xiaofeng QU --- layout/_partial/post/thumbnail.ejs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/_partial/post/thumbnail.ejs b/layout/_partial/post/thumbnail.ejs index 8682885..b53b0e4 100644 --- a/layout/_partial/post/thumbnail.ejs +++ b/layout/_partial/post/thumbnail.ejs @@ -1,14 +1,16 @@ <% var s = ""; - + if (post.thumbnail){ s = post.thumbnail; }else if (post.banner){ s = post.banner; + }else if (post.photos && post.photos.length){ + s = post.photos[0]; }else{ var img=/\/ig; - var result = post.content.match(img); + var result = post.content.match(img); result = img.exec(post.content); if(result != null) { for(var i = result.length -1; i; --i){ From 9396bc199473f4235971333a8f27b26ec1f1609b Mon Sep 17 00:00:00 2001 From: Xiaofeng QU Date: Mon, 6 Jul 2015 13:34:58 +0800 Subject: [PATCH 04/11] Added since to the copyright line Signed-off-by: Xiaofeng QU --- layout/_partial/footer.ejs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index a085e36..9f4dff6 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -4,7 +4,7 @@ <% } %> From fdf13df5d886d9aadb890f9481decb158956e964 Mon Sep 17 00:00:00 2001 From: ppoffice Date: Mon, 6 Jul 2015 16:41:16 +0800 Subject: [PATCH 05/11] edit readme & site config example --- README.md | 16 ++++++++++++++-- _config.yml.site.example | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea4a67f..5eedeb1 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,19 @@ disqus_shortname: - **location** - Where you live in. - **disqus_shortname** - Your Disqus shortname. -## Custom Categories & Tags Pages +### Post Thumbnail & Banner + +You can add a thumbnail and a banner to each post by adding the following lines into your post source files' front-matter: +```r +title: Demo +date: 2015-01-01 +... +# add those +thumbnail: http://example.com/thumbnail.jpg +banner: http://example.com/banner.jpg +``` + +### Custom Categories & Tags Pages To enable custom categories page and tags page, just copy the `categories` folder and `tags` folder under your theme's `_source` foler into your site's `source` folder. Then edit theme's _config.yml and add the following lines: ```r @@ -119,7 +131,7 @@ menu: ... ``` -## Languages +### Languages English and Simplified Chinese are the default languages of the theme. You can add translations in the `languages` folder and change the default language in blog's `_config.yml`. diff --git a/_config.yml.site.example b/_config.yml.site.example index 4812df1..0173ed3 100644 --- a/_config.yml.site.example +++ b/_config.yml.site.example @@ -13,6 +13,7 @@ location: 'Harbin, China' follow: https://github.com/ppoffice/ language: en timezone: +since: 2000 # The start year showing in your copyright section. # URL ## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/' From 40cc0c92d2c4084d88d4d2c229f9e7b28b803dd4 Mon Sep 17 00:00:00 2001 From: Xiaofeng QU Date: Sat, 11 Jul 2015 09:13:07 +0800 Subject: [PATCH 06/11] Added a hidedate option to article.ejs Signed-off-by: Xiaofeng QU --- layout/_partial/article.ejs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index a1470d3..1ddcae9 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -7,8 +7,10 @@ <% if (post.link || post.title){ %>
<%- partial('post/title', {class_name: 'article-title'}) %> -
From 3e43f1b44af748445171764d29831bd244a6c5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Qu=20Xiaofeng=20/=20=E6=9B=B2=E6=99=93=E5=B3=B0?= Date: Sat, 11 Jul 2015 09:22:25 +0800 Subject: [PATCH 07/11] Adjusted the indent --- layout/_partial/article.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layout/_partial/article.ejs b/layout/_partial/article.ejs index 1ddcae9..97ba00e 100644 --- a/layout/_partial/article.ejs +++ b/layout/_partial/article.ejs @@ -7,7 +7,7 @@ <% if (post.link || post.title){ %>
<%- partial('post/title', {class_name: 'article-title'}) %> -