mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
313ad449cd | ||
|
|
f4a1d9ce6a | ||
|
|
1f931b3e30 | ||
|
|
06a14739db | ||
|
|
622f37ecc8 | ||
|
|
0cdd14eb1e |
@@ -28,6 +28,7 @@ branches:
|
||||
only:
|
||||
- master
|
||||
- themes
|
||||
- 3.4-stable*
|
||||
|
||||
notifications:
|
||||
slack:
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 3.4.1 / 2017-03-02
|
||||
|
||||
* Backport #5920 for v3.4.x: Allow abbreviated post dates (#5924)
|
||||
|
||||
## 3.4.0 / 2016-01-27
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
@@ -4,6 +4,12 @@ permalink: "/docs/history/"
|
||||
note: This file is autogenerated. Edit /History.markdown instead.
|
||||
---
|
||||
|
||||
## 3.4.1 / 2017-03-02
|
||||
{: #v3-4-1}
|
||||
|
||||
- Backport [#5920]({{ site.repository }}/issues/5920) for v3.4.x: Allow abbreviated post dates ([#5924]({{ site.repository }}/issues/5924))
|
||||
|
||||
|
||||
## 3.4.0 / 2016-01-27
|
||||
{: #v3-4-0}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.4.0
|
||||
3.4.1
|
||||
|
||||
@@ -9,7 +9,7 @@ module Jekyll
|
||||
|
||||
YAML_FRONT_MATTER_REGEXP = %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m
|
||||
DATELESS_FILENAME_MATCHER = %r!^(?:.+/)*(.*)(\.[^.]+)$!
|
||||
DATE_FILENAME_MATCHER = %r!^(?:.+/)*(\d{4}-\d{2}-\d{2})-(.*)(\.[^.]+)$!
|
||||
DATE_FILENAME_MATCHER = %r!^(?:.+/)*(\d{2,4}-\d{1,2}-\d{1,2})-(.*)(\.[^.]+)$!
|
||||
|
||||
# Create a new Document.
|
||||
#
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Jekyll
|
||||
VERSION = "3.4.0".freeze
|
||||
VERSION = "3.4.1".freeze
|
||||
end
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
desc "Release #{name} v#{version}"
|
||||
task :release => :build do
|
||||
unless `git branch` =~ %r!^\* master$!
|
||||
current_branch = `git branch`.to_s.strip.match(%r!^\* (.+)$!)[1]
|
||||
unless current_branch == "master" || current_branch.end_with?("-stable")
|
||||
puts "You must be on the master branch to release!"
|
||||
exit!
|
||||
end
|
||||
|
||||
5
test/source/_posts/2017-2-5-i-dont-like-zeroes.md
Normal file
5
test/source/_posts/2017-2-5-i-dont-like-zeroes.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
foo: bar
|
||||
---
|
||||
I have an abbreviated date. Instead of "2017-02-05", I am instead "2017-2-5".
|
||||
Zeros have always seemed superfluous.
|
||||
@@ -7,11 +7,14 @@ class TestGeneratedSite < JekyllUnitTest
|
||||
|
||||
@site = fixture_site
|
||||
@site.process
|
||||
@index = File.read(dest_dir("index.html"))
|
||||
@index = File.read(
|
||||
dest_dir("index.html"),
|
||||
Utils.merged_file_read_opts(@site, {})
|
||||
)
|
||||
end
|
||||
|
||||
should "ensure post count is as expected" do
|
||||
assert_equal 51, @site.posts.size
|
||||
assert_equal 52, @site.posts.size
|
||||
end
|
||||
|
||||
should "insert site.posts into the index" do
|
||||
@@ -48,6 +51,13 @@ class TestGeneratedSite < JekyllUnitTest
|
||||
assert_exist dest_dir("dynamic_file.php")
|
||||
end
|
||||
|
||||
should "include a post with a abbreviated dates" do
|
||||
refute_nil @site.posts.index { |post|
|
||||
post.relative_path == "_posts/2017-2-5-i-dont-like-zeroes.md"
|
||||
}
|
||||
assert_exist dest_dir("2017", "02", "05", "i-dont-like-zeroes.html")
|
||||
end
|
||||
|
||||
should "print a nice list of static files" do
|
||||
time_regexp = "\\d+:\\d+"
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user