From b65aa4748bdcad9f62e20467dd79a2bc3f573192 Mon Sep 17 00:00:00 2001 From: Adam Petrie Date: Wed, 27 Jul 2016 17:00:19 -0400 Subject: [PATCH 01/17] Initial 404 page --- site/404.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 site/404.html diff --git a/site/404.html b/site/404.html new file mode 100644 index 00000000..4a565d6e --- /dev/null +++ b/site/404.html @@ -0,0 +1,22 @@ +--- +layout: default +permalink: /404.html +--- + +
+
+
+

404 - Page Not Found

+
+
+
+ +
+
+
+
+ The page you requested was not found. +
+
+
+
From ea185f11af99509d2acfc906938e79a37cc60b24 Mon Sep 17 00:00:00 2001 From: Adam Petrie Date: Wed, 27 Jul 2016 18:32:49 -0400 Subject: [PATCH 02/17] sitemap: false so that the error page is not indexed --- site/404.html | 1 + 1 file changed, 1 insertion(+) diff --git a/site/404.html b/site/404.html index 4a565d6e..8fe6a91d 100644 --- a/site/404.html +++ b/site/404.html @@ -1,6 +1,7 @@ --- layout: default permalink: /404.html +sitemap: false ---
From 954c0bfe077894a455b9e30d9e14829c98059d54 Mon Sep 17 00:00:00 2001 From: Adam Petrie Date: Wed, 27 Jul 2016 18:33:16 -0400 Subject: [PATCH 03/17] Use more generic wording. --- site/404.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site/404.html b/site/404.html index 8fe6a91d..75d90feb 100644 --- a/site/404.html +++ b/site/404.html @@ -7,7 +7,7 @@ sitemap: false
-

404 - Page Not Found

+

404 - Not Found

@@ -16,7 +16,7 @@ sitemap: false
- The page you requested was not found. + The resource you requested was not found.
From 142957ff49177a0bb1eb7836f72dbb2cde7a93bc Mon Sep 17 00:00:00 2001 From: Adam Petrie Date: Wed, 27 Jul 2016 19:08:37 -0400 Subject: [PATCH 04/17] Create error template that has no main nav or footer. --- site/404.html | 2 +- site/_layouts/error.html | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 site/_layouts/error.html diff --git a/site/404.html b/site/404.html index 75d90feb..d931859a 100644 --- a/site/404.html +++ b/site/404.html @@ -1,5 +1,5 @@ --- -layout: default +layout: error permalink: /404.html sitemap: false --- diff --git a/site/_layouts/error.html b/site/_layouts/error.html new file mode 100644 index 00000000..f5bc5c9b --- /dev/null +++ b/site/_layouts/error.html @@ -0,0 +1,23 @@ +{% include top.html %} + + +
+
+ +
+
+ + {{ content }} + + {% include anchor_links.html %} + {% include analytics.html %} + + + From 83456e7cd2171b784ecdcc98f4c2baa69f19aed2 Mon Sep 17 00:00:00 2001 From: Adam Petrie Date: Wed, 27 Jul 2016 19:09:20 -0400 Subject: [PATCH 05/17] Add helpful links and minor alignment tweak. --- site/404.html | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/site/404.html b/site/404.html index d931859a..ac005bdd 100644 --- a/site/404.html +++ b/site/404.html @@ -6,7 +6,7 @@ sitemap: false
-
+

404 - Not Found

@@ -15,9 +15,24 @@ sitemap: false
-
- The resource you requested was not found. -
+

The resource you requested was not found. Here are some links to help you find your way:

+
From 1155371f4eb84d7d04f6d20c3545b1a357066adf Mon Sep 17 00:00:00 2001 From: Adam Petrie Date: Wed, 27 Jul 2016 19:53:36 -0400 Subject: [PATCH 06/17] Puns FTW --- site/404.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/404.html b/site/404.html index ac005bdd..4240cb0e 100644 --- a/site/404.html +++ b/site/404.html @@ -7,7 +7,7 @@ sitemap: false
-

404 - Not Found

+

Huh. It seems that page is
Hyde-ing...

From 989fc9c3dbb1c268052d56effa46bd6f3e9c9fb3 Mon Sep 17 00:00:00 2001 From: Adam Petrie Date: Wed, 27 Jul 2016 19:54:07 -0400 Subject: [PATCH 07/17] Centre align text and use nav styles on helpful links. --- site/404.html | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/site/404.html b/site/404.html index 4240cb0e..e21f2323 100644 --- a/site/404.html +++ b/site/404.html @@ -14,25 +14,27 @@ sitemap: false
-
+

The resource you requested was not found. Here are some links to help you find your way:

- +
From 62924764828386e45df4e3233c8caf7baec03a70 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 28 Jul 2016 09:52:30 -0400 Subject: [PATCH 08/17] [site] enable excerpts --- site/_config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/site/_config.yml b/site/_config.yml index 0b69dc98..0c1e3245 100644 --- a/site/_config.yml +++ b/site/_config.yml @@ -1,7 +1,6 @@ markdown: kramdown highlighter: rouge permalink: /news/:year/:month/:day/:title/ -excerpt_separator: "" gauges_id: 503c5af6613f5d0f19000027 google_analytics_id: UA-50755011-1 From 1bf47ec394039f1577430e0c4143c8c8d255b784 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 28 Jul 2016 10:21:30 -0400 Subject: [PATCH 09/17] include theme directories in default gemspec --- lib/theme_template/theme.gemspec.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/theme_template/theme.gemspec.erb b/lib/theme_template/theme.gemspec.erb index dac6ed39..4d4ed171 100644 --- a/lib/theme_template/theme.gemspec.erb +++ b/lib/theme_template/theme.gemspec.erb @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.homepage = "TODO: Put your gem's website or public repo URL here." spec.license = "MIT" - spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(<%= theme_directories.join("|") %>)/}) } + spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>)/}) } spec.add_development_dependency "jekyll", "~> <%= jekyll_version_with_minor %>" spec.add_development_dependency "bundler", "~> 1.12" From 54281530fb1a1065ba0fd711e9abda10f8ed364c Mon Sep 17 00:00:00 2001 From: Jordon Bedwell Date: Thu, 28 Jul 2016 13:15:29 -0500 Subject: [PATCH 10/17] Revert "Readability: lib/jekyll/static_file.rb." This reverts commit 26f1ea24871c545fe53bbcc313dbc5d437d46915. --- lib/jekyll/static_file.rb | 76 ++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 46 deletions(-) diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb index 6126820c..0f8544ee 100644 --- a/lib/jekyll/static_file.rb +++ b/lib/jekyll/static_file.rb @@ -3,9 +3,7 @@ module Jekyll attr_reader :relative_path, :extname class << self - # - # The cache of last modification times - # [path] -> mtime. + # The cache of last modification times [path] -> mtime. def mtimes @mtimes ||= {} end @@ -31,29 +29,25 @@ module Jekyll @relative_path = File.join(*[@dir, @name].compact) @extname = File.extname(@name) end - # rubocop: enable ParameterLists + # Returns source file path. def path - File.join( - *[@base, @dir, @name].compact - ) + File.join(*[@base, @dir, @name].compact) end # Obtain destination path. + # # dest - The String path to the destination dir. + # # Returns destination file path. def destination(dest) - @site.in_dest_dir( - *[dest, destination_rel_dir, @name].compact - ) + @site.in_dest_dir(*[dest, destination_rel_dir, @name].compact) end def destination_rel_dir if @collection - File.dirname( - url - ) + File.dirname(url) else @dir end @@ -69,12 +63,14 @@ module Jekyll end # Is source path modified? + # # Returns true if modified since last write. def modified? self.class.mtimes[path] != mtime end # Whether to write the file to the filesystem + # # Returns true unless the defaults for the destination path from # _config.yml contain `published: false`. def write? @@ -82,18 +78,20 @@ module Jekyll end # Write the static file to the destination directory (if modified). - # Returns false if the file was not modified since last time (no-op). + # # dest - The String path to the destination dir. + # + # Returns false if the file was not modified since last time (no-op). def write(dest) dest_path = destination(dest) - if File.exist?(dest_path) && !modified? - return false - end + return false if File.exist?(dest_path) && !modified? self.class.mtimes[path] = mtime + FileUtils.mkdir_p(File.dirname(dest_path)) FileUtils.rm(dest_path) if File.exist?(dest_path) copy_file(dest_path) + true end @@ -108,12 +106,11 @@ module Jekyll def placeholders { :collection => @collection.label, + :path => relative_path[ + @collection.relative_directory.size..relative_path.size], :output_ext => "", :name => "", - :title => "", - :path => relative_path[ - @collection.relative_directory.size..relative_path.size - ] + :title => "" } end @@ -121,16 +118,14 @@ module Jekyll # the collection's URL template into account. The default URL template can # be overriden in the collection's configuration in _config.yml. def url - @url ||= - if @collection.nil? - relative_path - else - ::Jekyll::URL.new({ - :template => @collection.url_template, - :placeholders => placeholders - }) - end - .to_s.gsub(%r!/$!, "") + @url ||= if @collection.nil? + relative_path + else + ::Jekyll::URL.new({ + :template => @collection.url_template, + :placeholders => placeholders + }) + end.to_s.gsub(%r!/$!, "") end # Returns the type of the collection if present, nil otherwise. @@ -141,28 +136,17 @@ module Jekyll # Returns the front matter defaults defined for the file's URL and/or type # as defined in _config.yml. def defaults - @defaults ||= @site.frontmatter_defaults.all( - url, type - ) + @defaults ||= @site.frontmatter_defaults.all url, type end private def copy_file(dest_path) if @site.safe || Jekyll.env == "production" - FileUtils.cp( - path, dest_path - ) + FileUtils.cp(path, dest_path) else - FileUtils.copy_entry( - path, dest_path - ) + FileUtils.copy_entry(path, dest_path) end - - File.utime( - self.class.mtimes[path], - self.class.mtimes[path], - dest_path - ) + File.utime(self.class.mtimes[path], self.class.mtimes[path], dest_path) end end end From 16ff4c12bbc7d9021a45e82bcbded15ba5be9f9c Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 28 Jul 2016 11:57:21 -0700 Subject: [PATCH 11/17] Update history to reflect merge of #5150 [ci skip] --- History.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.markdown b/History.markdown index 02f4091d..f6f0ef65 100644 --- a/History.markdown +++ b/History.markdown @@ -1,3 +1,9 @@ +## HEAD + +### Site Enhancements + + * Enable site excerpts (#5150) + ## 3.2.0 / 2016-07-26 ### Minor Enhancements From 94af8ca75a97449af5f2dcf4b78aab64fb528c8c Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 28 Jul 2016 11:58:26 -0700 Subject: [PATCH 12/17] Update history to reflect merge of #5143 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index f6f0ef65..2a4778fe 100644 --- a/History.markdown +++ b/History.markdown @@ -3,6 +3,7 @@ ### Site Enhancements * Enable site excerpts (#5150) + * Initial 404 page (#5143) ## 3.2.0 / 2016-07-26 From b22fa7ce4e9582afb9d24239c3514bb6c99447e5 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 28 Jul 2016 15:39:41 -0400 Subject: [PATCH 13/17] note that themes have been released --- site/_docs/themes.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/site/_docs/themes.md b/site/_docs/themes.md index 02e1ebf5..2b7155bb 100644 --- a/site/_docs/themes.md +++ b/site/_docs/themes.md @@ -4,15 +4,6 @@ title: Themes permalink: /docs/themes/ --- -
-
This feature is unreleased!
-

- Jekyll 3.0 and 3.1 do NOT have the ability to add themes in this way. - The documentation below is for an unreleased version of Jekyll and - cannot be used at the moment. -

-
- Jekyll has an extensive theme system, which allows you to leverage community-maintained templates and styles to customize your site's presentation. Jekyll themes package layouts, includes, and stylesheets in a way that can be overridden by your site's content. ## Installing a theme From 9220c5a634727888e30cce86c3ce79096b018497 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 28 Jul 2016 15:43:45 -0400 Subject: [PATCH 14/17] Also include LICENSE and README --- lib/theme_template/theme.gemspec.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/theme_template/theme.gemspec.erb b/lib/theme_template/theme.gemspec.erb index 4d4ed171..c3ef43ec 100644 --- a/lib/theme_template/theme.gemspec.erb +++ b/lib/theme_template/theme.gemspec.erb @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.homepage = "TODO: Put your gem's website or public repo URL here." spec.license = "MIT" - spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>)/}) } + spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>LICENSE|README)/i}) } spec.add_development_dependency "jekyll", "~> <%= jekyll_version_with_minor %>" spec.add_development_dependency "bundler", "~> 1.12" From 27cfa00a439d9cae4111f85ea26914b09e716950 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 28 Jul 2016 13:22:20 -0700 Subject: [PATCH 15/17] Update history to reflect merge of #5158 [ci skip] --- History.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/History.markdown b/History.markdown index 2a4778fe..37772ba8 100644 --- a/History.markdown +++ b/History.markdown @@ -4,6 +4,7 @@ * Enable site excerpts (#5150) * Initial 404 page (#5143) + * Remove the "this feature is unreleased" warning from the theme docs (#5158) ## 3.2.0 / 2016-07-26 From 909800839c556bb906c51d8b616ca49e2c7e2b10 Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Thu, 28 Jul 2016 16:31:20 -0400 Subject: [PATCH 16/17] Missing trailing | --- lib/theme_template/theme.gemspec.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/theme_template/theme.gemspec.erb b/lib/theme_template/theme.gemspec.erb index c3ef43ec..d403d674 100644 --- a/lib/theme_template/theme.gemspec.erb +++ b/lib/theme_template/theme.gemspec.erb @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.homepage = "TODO: Put your gem's website or public repo URL here." spec.license = "MIT" - spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>LICENSE|README)/i}) } + spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>|LICENSE|README)/i}) } spec.add_development_dependency "jekyll", "~> <%= jekyll_version_with_minor %>" spec.add_development_dependency "bundler", "~> 1.12" From 3b2bbcb70f13e4c0cef20228a2acdbec51a96526 Mon Sep 17 00:00:00 2001 From: jekyllbot Date: Thu, 28 Jul 2016 14:02:11 -0700 Subject: [PATCH 17/17] Update history to reflect merge of #5152 [ci skip] --- History.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/History.markdown b/History.markdown index 37772ba8..84a1b586 100644 --- a/History.markdown +++ b/History.markdown @@ -6,6 +6,10 @@ * Initial 404 page (#5143) * Remove the "this feature is unreleased" warning from the theme docs (#5158) +### Bug Fixes + + * Include theme directories in default gemspec (#5152) + ## 3.2.0 / 2016-07-26 ### Minor Enhancements