diff --git a/.themes/classic/source/_includes/blog_index.html b/.themes/classic/source/_includes/blog_index.html new file mode 100644 index 0000000..c77ea7d --- /dev/null +++ b/.themes/classic/source/_includes/blog_index.html @@ -0,0 +1,40 @@ +
+{% assign index = true %} +{% for post in paginator.posts %} +{% assign content = post.content %} +
+ {% include article.html %} +
+{% endfor %} + +{% if site.disqus_short_name %} + +{% endif %} +
+ diff --git a/.themes/classic/source/index.html b/.themes/classic/source/index.html index 7f4c0e1..fa5310a 100644 --- a/.themes/classic/source/index.html +++ b/.themes/classic/source/index.html @@ -1,44 +1,5 @@ --- layout: default -footer: false --- -
-{% assign index = true %} -{% for post in paginator.posts %} -{% assign content = post.content %} -
- {% include article.html %} -
-{% endfor %} - -{% if site.disqus_short_name %} - -{% endif %} -
- + +{% include blog_index.html %} diff --git a/Rakefile b/Rakefile index f730f86..48f287d 100644 --- a/Rakefile +++ b/Rakefile @@ -1,6 +1,10 @@ require "rubygems" require "bundler/setup" +# If you customize your site's index page setting custom_index to true +# will preserve your changes when running `rake update_source` +custom_index = false + ## -- Rsync Deploy config -- ## # Be sure your public key is listed in your server's ~/.ssh/authorized_keys file ssh_user = "mathisweb@octopress.org" @@ -151,6 +155,7 @@ task :update_source, :theme do |t, args| system "mkdir -p #{source_dir}; cp -R #{themes_dir}/"+theme+"/source/. #{source_dir}" system "cp -Rn #{source_dir}.old/. #{source_dir}" system "cp -Rf #{source_dir}.old/_includes/custom/. #{source_dir}/_includes/custom/" + system "cp -Rf #{source_dir}.old/index.html #{source_dir}" if custom_index puts "## Updated #{source_dir} ##" end