From 3525825e906d0aab6199231cea48f248b04013e5 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 31 Jul 2011 12:02:28 -0400 Subject: [PATCH 1/5] limited atom feed to 20 most recent items --- .themes/classic/source/atom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.themes/classic/source/atom.xml b/.themes/classic/source/atom.xml index 3b4e661..23de64e 100644 --- a/.themes/classic/source/atom.xml +++ b/.themes/classic/source/atom.xml @@ -16,7 +16,7 @@ layout: nil {% endif %} - {% for post in site.posts %} + {% for post in site.posts limit: 20 %} {{ post.title }} From d344a8c7ace65cdd50166750b451c81851317834 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 31 Jul 2011 12:27:25 -0400 Subject: [PATCH 2/5] added support for custom includes --- .themes/classic/source/_includes/custom/asides/about.html | 4 ++++ .themes/classic/source/_includes/custom/head.html | 3 +++ .themes/classic/source/_includes/head.html | 3 +-- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .themes/classic/source/_includes/custom/asides/about.html create mode 100644 .themes/classic/source/_includes/custom/head.html diff --git a/.themes/classic/source/_includes/custom/asides/about.html b/.themes/classic/source/_includes/custom/asides/about.html new file mode 100644 index 0000000..59d309e --- /dev/null +++ b/.themes/classic/source/_includes/custom/asides/about.html @@ -0,0 +1,4 @@ +
+

About Me

+

A little something about me.

+
diff --git a/.themes/classic/source/_includes/custom/head.html b/.themes/classic/source/_includes/custom/head.html new file mode 100644 index 0000000..15a6d9d --- /dev/null +++ b/.themes/classic/source/_includes/custom/head.html @@ -0,0 +1,3 @@ + + + diff --git a/.themes/classic/source/_includes/head.html b/.themes/classic/source/_includes/head.html index e7663ea..97f62de 100644 --- a/.themes/classic/source/_includes/head.html +++ b/.themes/classic/source/_includes/head.html @@ -25,11 +25,10 @@ - - {% capture rss_url %}{% if site.subscribe_rss contains ':' %}{{ site.subscribe_rss }}{% else %}{{ root_url }}{{ site.subscribe_rss }}{% endif %}{% endcapture %} {% include google_analytics.html %} {% include google_plus_one.html %} {% include twitter_sharing.html %} + {% include custom/head.html %} From 705ba9a394e94214207e2aac178c9d933051ea4d Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 31 Jul 2011 12:44:07 -0400 Subject: [PATCH 3/5] update instructions for adding custom asides --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index d1362ea..769ad02 100644 --- a/_config.yml +++ b/_config.yml @@ -34,7 +34,7 @@ paginate: 10 # Posts per page on the blog index recent_posts: 5 # Posts in the sidebar Recent Posts section # list each of the sidebar modules you want to include, in the order you want them to appear. -# To add custom asides, create files in /source/_includes/asides/custom/ and add them to the list like 'asides/custom/custom_aside_name.html' +# To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html' default_asides: [asides/recent_posts.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html] # Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below From 07f4937bfd5208916eece1032ae2794f2d1ce92d Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 31 Jul 2011 13:13:00 -0400 Subject: [PATCH 4/5] added custom partials for for footer and navigation --- .themes/classic/source/_includes/custom/footer.html | 4 ++++ .themes/classic/source/_includes/custom/navigation.html | 4 ++++ .themes/classic/source/_includes/footer.html | 5 +---- .themes/classic/source/_includes/navigation.html | 5 +---- 4 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 .themes/classic/source/_includes/custom/footer.html create mode 100644 .themes/classic/source/_includes/custom/navigation.html diff --git a/.themes/classic/source/_includes/custom/footer.html b/.themes/classic/source/_includes/custom/footer.html new file mode 100644 index 0000000..e12f067 --- /dev/null +++ b/.themes/classic/source/_includes/custom/footer.html @@ -0,0 +1,4 @@ +

+ Copyright © {{ site.time | date: "%Y" }} - {{ site.author }} - + Powered by Octopress +

diff --git a/.themes/classic/source/_includes/custom/navigation.html b/.themes/classic/source/_includes/custom/navigation.html new file mode 100644 index 0000000..8f091e1 --- /dev/null +++ b/.themes/classic/source/_includes/custom/navigation.html @@ -0,0 +1,4 @@ + diff --git a/.themes/classic/source/_includes/footer.html b/.themes/classic/source/_includes/footer.html index e12f067..3a8c768 100644 --- a/.themes/classic/source/_includes/footer.html +++ b/.themes/classic/source/_includes/footer.html @@ -1,4 +1 @@ -

- Copyright © {{ site.time | date: "%Y" }} - {{ site.author }} - - Powered by Octopress -

+{% include custom/footer.html %} diff --git a/.themes/classic/source/_includes/navigation.html b/.themes/classic/source/_includes/navigation.html index 4b1885e..c26908f 100644 --- a/.themes/classic/source/_includes/navigation.html +++ b/.themes/classic/source/_includes/navigation.html @@ -10,7 +10,4 @@ - +{% include custom/navigation.html %} From 5d24e0ba2b3ae72f56b3e9daf586b8e7bccfd6ae Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 31 Jul 2011 13:24:38 -0400 Subject: [PATCH 5/5] udpated rake udpate_source task to preserve custom includes instaed of preserving navigation and footer --- Rakefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 734bbbd..86e07b5 100644 --- a/Rakefile +++ b/Rakefile @@ -149,8 +149,7 @@ task :update_source, :theme do |t, args| puts "moved #{source_dir} into #{source_dir}.old/" system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/. #{source_dir}" system "cp -Rn #{source_dir}.old/. #{source_dir}" - system "cp -f #{source_dir}.old/_includes/navigation.html #{source_dir}/_includes/navigation.html" - system "cp -f #{source_dir}.old/_includes/footer.html #{source_dir}/_includes/footer.html" + system "cp -Rf #{source_dir}.old/_includes/custom/. #{source_dir}/_includes/custom/" puts "## Updated #{source_dir} ##" end