From a49651fdfdf2ba3cbf3193820831177c13aaddbf Mon Sep 17 00:00:00 2001 From: Andrew Patton Date: Wed, 2 May 2012 18:43:33 -0300 Subject: [PATCH 1/2] =?UTF-8?q?Fixed=20=E2=80=9C3rd=20party=20plugins?= =?UTF-8?q?=E2=80=9D=20wiki=20page=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Brandon Mathis --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index c181401..06ea423 100644 --- a/README.markdown +++ b/README.markdown @@ -16,7 +16,7 @@ Check out [Octopress.org](http://octopress.org/docs) for guides and documentatio ## Contributing -We love to see people contributing to Octopress, whether it's a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a [list of 3rd party plug-ins](https://github.com/imathis/octopress/wiki/3rd-party-plug-ins), where you can link your own Octopress plug-in repositories. For the future, we're thinking about ways to easier add them them into our main releases. +We love to see people contributing to Octopress, whether it's a bug report, feature suggestion or a pull request. At the moment, we try to keep the core slick and lean, focusing on basic blogging needs, so some of your suggestions might not find their way into Octopress. For those ideas, we started a [list of 3rd party plug-ins](https://github.com/imathis/octopress/wiki/3rd-party-plugins), where you can link your own Octopress plug-in repositories. For the future, we're thinking about ways to easier add them them into our main releases. ## License From 741107291b883bd370f77e49067f2855a349c964 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Sun, 20 May 2012 22:23:18 -0500 Subject: [PATCH 2/2] Added 404, moved archives from /blog/archives to /archives, added migration in update_source rake task. Closes #375 --- .themes/classic/source/404.markdown | 8 ++++++++ .../classic/source/_includes/custom/navigation.html | 2 +- .themes/classic/source/{blog => }/archives/index.html | 0 .themes/classic/source/index.html | 2 +- Rakefile | 11 ++++++++--- 5 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 .themes/classic/source/404.markdown rename .themes/classic/source/{blog => }/archives/index.html (100%) diff --git a/.themes/classic/source/404.markdown b/.themes/classic/source/404.markdown new file mode 100644 index 0000000..1d69211 --- /dev/null +++ b/.themes/classic/source/404.markdown @@ -0,0 +1,8 @@ +--- +layout: page +title: Page Not Found +--- + +Oops, I couldn’t find that page! Sorry about that. + +Maybe try the search box (top right), or look through the [archives](/archives)? diff --git a/.themes/classic/source/_includes/custom/navigation.html b/.themes/classic/source/_includes/custom/navigation.html index d6bd424..5c9cae4 100644 --- a/.themes/classic/source/_includes/custom/navigation.html +++ b/.themes/classic/source/_includes/custom/navigation.html @@ -1,4 +1,4 @@ diff --git a/.themes/classic/source/blog/archives/index.html b/.themes/classic/source/archives/index.html similarity index 100% rename from .themes/classic/source/blog/archives/index.html rename to .themes/classic/source/archives/index.html diff --git a/.themes/classic/source/index.html b/.themes/classic/source/index.html index d826b41..d201912 100644 --- a/.themes/classic/source/index.html +++ b/.themes/classic/source/index.html @@ -13,7 +13,7 @@ layout: default {% if paginator.next_page %} {% endif %} - Blog Archives + Blog Archives {% if paginator.previous_page %} {% endif %} diff --git a/Rakefile b/Rakefile index 18a0b00..8675877 100644 --- a/Rakefile +++ b/Rakefile @@ -200,9 +200,14 @@ task :update_source, :theme do |t, args| cp "#{source_dir}.old/favicon.png", source_dir mv "#{source_dir}/index.html", "#{blog_index_dir}", :force=>true if blog_index_dir != source_dir cp "#{source_dir}.old/index.html", source_dir if blog_index_dir != source_dir && File.exists?("#{source_dir}.old/index.html") - if File.exists?("#{source_dir}/archives/index.html") - rm "#{source_dir}/archives/index.html" - mv "#{source_dir}/blog/archives/index.html", "#{source_dir}/archives/index.html" + if File.exists?("#{source_dir}/blog/archives/index.html") + puts "## Moving blog/archives to /archives (standard location as of 2.1) ##" + file = "#{source_dir}/_includes/custom/navigation.html" + navigation = IO.read(file) + navigation = navigation.gsub(/(.*)\/blog(\/archives)(.*$)/m, '\1\2\3') + File.open(file, 'w') do |f| + f.write navigation + end rm_r "#{source_dir}/blog/archives" rm_r "#{source_dir}/blog" if Dir.entries("#{source_dir}/blog").join == "..." end