Compare commits

...

24 Commits

Author SHA1 Message Date
Parker Moore
7312a5af4f Don't refer to YAML-with-dots. 2015-01-10 01:37:45 -08:00
Parker Moore
46d2794acb Revert "Permit YAML blocks to end with three dots"
This reverts commit 52ac2b3850, introduced in
v2.0.0 by @lmullen. It has been reverted because it adds complication to
the process of writing Jekyll sites ("Do I use dots or dashes here??") and
because the sole purpose was to bend to the will of pandoc, which could
just as easily prefer dashes to dots.

Ref: #2110, 3134
2015-01-10 01:34:17 -08:00
Parker Moore
e2a5a9dbc1 Update history to reflect merge of #3256 [ci skip] 2015-01-10 00:14:34 -08:00
Parker Moore
f2650e7b0f Merge pull request #3256 from XhmikosR/accessibility-tweaks 2015-01-10 00:14:09 -08:00
Parker Moore
8b6a9d66ec Update history to reflect merge of #3258 [ci skip] 2015-01-10 00:12:40 -08:00
Parker Moore
0bf82e9cf7 Merge pull request #3258 from omegahm/symlink-local-tmp 2015-01-10 00:12:06 -08:00
Parker Moore
4e9b0663be Update history to reflect merge of #3279 [ci skip] 2015-01-10 00:09:18 -08:00
Parker Moore
b9542c5426 Merge pull request #3279 from jekyll/fix-cross-platform-testing 2015-01-10 00:08:29 -08:00
Parker Moore
0a4bd99e6b Update history to reflect merge of #3271 [ci skip] 2015-01-10 00:05:03 -08:00
Parker Moore
5536f950f9 Merge pull request #3271 from maban/patch-1 2015-01-10 00:04:16 -08:00
Parker Moore
989639256d Update history to reflect merge of #3278 [ci skip] 2015-01-10 00:00:30 -08:00
Parker Moore
9a52d56b5a Merge pull request #3278 from jekyll/kevinushey-bugfix/highlight-whitespace-stripping 2015-01-10 00:00:06 -08:00
Parker Moore
a6238c36d5 Fix script/test to be more cross-compatible with other platforms 2015-01-09 23:58:32 -08:00
Parker Moore
730aedd0a3 Add Rake's test loader because it is inconsistently installed. 2015-01-09 23:57:52 -08:00
Parker Moore
4cbd814546 Add support for Windows line feeds too. 2015-01-09 23:55:47 -08:00
Parker Moore
cae9d96cc4 Add test for stripping just newlines from code blocks.
Ref #3275.
2015-01-09 23:51:34 -08:00
Parker Moore
8a9c48c7b4 Update history to reflect merge of #3277 [ci skip] 2015-01-09 23:33:21 -08:00
Parker Moore
faccf8f802 Merge pull request #3277 from paulrayner/jekyll-asciidoc_plugin 2015-01-09 23:32:49 -08:00
Paul Rayner
bce4680182 Add new AsciiDoc plugin gem to list of Jekyll plugins. 2015-01-09 15:41:45 -07:00
Kevin Ushey
b92274b101 only strip newlines when rendering highlight blocks (#3265) 2015-01-09 00:07:11 -08:00
Anna Debenham
e7c0e313a3 Change collection documentation based on #223
Clarifying what happens if no YAML front matter exists. The current explanation says that Jekyll will generate a file without Front Matter, but it appears this isn't the case.

I'm still not sure if this is the intended behaviour, but this clarifies how it currently works.
2015-01-08 18:39:27 +00:00
XhmikosR
b6c197d312 Docs: Assorted accessibility tweaks. 2015-01-05 13:32:35 +02:00
Mads Ohm Larsen
1062fdf89f Use local tmp folder for symlink tests 2015-01-05 09:28:54 +01:00
Mads Ohm Larsen
a2b6aa263e Add local tmp folder 2015-01-05 09:28:54 +01:00
21 changed files with 140 additions and 63 deletions

2
.gitignore vendored
View File

@@ -13,5 +13,5 @@ site/_site/
coverage
.ruby-version
.sass-cache
tmp/stackprof-*
tmp/*
.jekyll-metadata

View File

@@ -24,6 +24,7 @@
* Kramdown: Use `enable_coderay` key instead of `use_coderay` (#3237)
* Unescape `Document` output path (#2924)
* Fix nav items alignment when on multiple rows (#3264)
* Highlight: Only Strip Newlines/Carriage Returns, not Spaces (#3278)
### Development Fixes
@@ -32,6 +33,8 @@
* Update rake task `site:publish` to fix minor bugs. (#3254)
* Switch to shields.io for the README badges. (#3255)
* Use `FileList` instead of `Dir.glob` in `site:publish` rake task (#3261)
* Fix test script to be platform-independent (#3279)
* Instead of symlinking `/tmp`, create and symlink a local `tmp` in the tests (#3258)
### Site Enhancements
@@ -40,6 +43,9 @@
* Add link to 'Adding Ajax pagination to Jekyll' to Resources page (#3186)
* Add a Resources link to tutorial on building dynamic navbars (#3185)
* Semantic structure improvements to the post and page layouts (#3251)
* Add new AsciiDoc plugin to list of third-party plugins. (#3277)
* Specify that all transformable collection documents must contain YAML front matter (#3271)
* Assorted accessibility fixes (#3256)
## 2.5.3 / 2014-12-22

View File

@@ -45,7 +45,7 @@ module Jekyll
begin
self.content = File.read(site.in_source_dir(base, name),
merged_file_read_opts(opts))
if content =~ /\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)/m
if content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m
self.content = $POSTMATCH
self.data = SafeYAML.load($1)
end

View File

@@ -42,7 +42,7 @@ eos
def render(context)
prefix = context["highlighter_prefix"] || ""
suffix = context["highlighter_suffix"] || ""
code = super.to_s.strip
code = super.to_s.gsub(/^(\n|\r)+|(\n|\r)+$/, '')
is_safe = !!context.registers[:site].safe

View File

@@ -4,25 +4,16 @@
# script/test
# script/test <test_file>
if [ ! -d tmp ]; then
mkdir tmp
fi
if [ -z "$1" ]; then
TEST_FILES="./test/test_*.rb"
TEST_FILES=$(ruby -e "puts Dir.glob('test/test_*.rb')")
else
TEST_FILES="$@"
fi
# bundle exec gem env
GEM_DIR=$(bundle exec gem env | grep -C 1 "GEM PATHS" | tail -1 | cut -d '-' -f2 | cut -d' ' -f2)
RAKE_LIB_WITH_VERSION=$(bundle exec ruby -e "puts Gem::Specification.find_by_name('rake').gem_dir.split('/').last + '/lib'")
RAKE_LIB_DIR="${GEM_DIR}/gems/${RAKE_LIB_WITH_VERSION}"
test -d "${RAKE_LIB_DIR}" || {
echo "No ${RAKE_LIB_DIR}. Installing Rake."
bundle show rake | cut -d'/' -f12 | cut -d'-' -f 2 | xargs bundle exec gem install rake -v
}
set -x
time bundle exec ruby -I"lib:test" \
-I"${RAKE_LIB_DIR}" \
"${RAKE_LIB_DIR}/rake/rake_test_loader.rb" \
$TEST_FILES
time bundle exec ruby -I"lib:test" -rloader $TEST_FILES

View File

@@ -37,7 +37,7 @@ collections:
### Step 2: Add your content
Create a corresponding folder (e.g. `<source>/_my_collection`) and add documents.
YAML Front Matter is read in as data if it exists, if not, then everything is just stuck in the Document's `content` attribute.
YAML Front Matter is read in as data if it exists, and everything after it is stuck in the Document's `content` attribute. If no YAML Front Matter is provided, Jekyll will not generate the file in your collection.
Note: the folder must be named identically to the collection you defined in your `_config.yml` file, with the addition of the preceding `_` character.
@@ -211,8 +211,7 @@ In addition to any YAML Front Matter provided in the document's corresponding fi
</td>
<td>
<p>
The (unrendered) content of the document. If no YAML Front Matter is provided,
this is the entirety of the file contents. If YAML Front Matter
The (unrendered) content of the document. If no YAML Front Matter is provided, Jekyll will not generate the file in your collection. If YAML Front Matter
is used, then this is all the contents of the file after the terminating
`---` of the front matter.
</p>

View File

@@ -514,6 +514,7 @@ You can find a few useful plugins at the following locations:
- [Org-mode Converter](https://gist.github.com/abhiyerra/7377603): Org-mode converter for Jekyll.
- [Customized Kramdown Converter](https://github.com/mvdbos/kramdown-with-pygments): Enable Pygments syntax highlighting for Kramdown-parsed fenced code blocks.
- [Bigfootnotes Plugin](https://github.com/TheFox/jekyll-bigfootnotes): Enables big footnotes for Kramdown.
- [AsciiDoc Plugin](https://github.com/asciidoctor/jekyll-asciidoc): AsciiDoc convertor for Jekyll using [Asciidoctor](http://asciidoctor.org/).
#### Filters

View File

@@ -3,7 +3,8 @@
var anchor = document.createElement("a");
anchor.className = "header-link";
anchor.href = "#" + id;
anchor.innerHTML = "<i class=\"fa fa-link\"></i>";
anchor.innerHTML = "<span class=\"sr-only\">Permalink</span><i class=\"fa fa-link\"></i>";
anchor.title = "Permalink";
return anchor;
};

View File

@@ -1,4 +1,4 @@
<footer>
<footer role="contentinfo">
<div class="grid">
<div class="unit one-third center-on-mobiles">
<p>The contents of this website are &copy;&nbsp;{{ site.time | date: '%Y' }} <a href="http://tom.preston-werner.com/">Tom Preston-Werner</a> under the terms of the <a href="{{ site.repository }}/blob/master/LICENSE">MIT&nbsp;License</a>.</p>

View File

@@ -1,4 +1,4 @@
<header>
<header role="banner">
<nav class="mobile-nav show-on-mobiles">
{% include primary-nav-items.html %}
</nav>
@@ -6,8 +6,8 @@
<div class="unit one-third center-on-mobiles">
<h1>
<a href="/">
<span>Jekyll</span>
<img src="/img/logo-2x.png" width="249" height="115" alt="Logo">
<span class="sr-only">Jekyll</span>
<img src="/img/logo-2x.png" width="249" height="115" alt="Jekyll Logo">
</a>
</h1>
</div>

View File

@@ -14,7 +14,7 @@
{{ post.date | date_to_string }}
</span>
<a href="https://github.com/{{ post.author }}" class="post-author">
<img src="https://github.com/{{ post.author }}.png" class="avatar" alt="{{ post.author }}" width="24" height="24">
<img src="https://github.com/{{ post.author }}.png" class="avatar" alt="{{ post.author }} avatar" width="24" height="24">
{{ post.author }}
</a>
</div>

View File

@@ -17,7 +17,7 @@ layout: news
{{ page.date | date_to_string }}
</span>
<a href="https://github.com/{{ page.author }}" class="post-author">
<img src="https://github.com/{{ page.author }}.png" class="avatar" alt="{{ page.author }}" width="24" height="24">
<img src="https://github.com/{{ page.author }}.png" class="avatar" alt="{{ page.author }} avatar" width="24" height="24">
{{ page.author }}
</a>
</div>

View File

@@ -44,9 +44,6 @@ header {
h1,
nav { display: inline-block; }
h1 {
span { display: none; }
}
}
nav {
@@ -165,10 +162,10 @@ h6:hover .header-link {
/* Footer */
footer {
background-color: #222;
background-color: #212121;
font-size: 16px;
padding-bottom: 5px;
color: #888;
color: #c0c0c0;
margin-top: 40px;
a {
@@ -230,7 +227,7 @@ footer {
.content { padding: 0; }
h4 {
h3 {
font-size: 24px;
line-height: 24px;
margin-top: 20px;
@@ -253,7 +250,7 @@ footer {
float: right;
}
h4 {
h3 {
margin: 50px 0 0;
text-align: center;
}
@@ -295,7 +292,7 @@ footer {
padding: 20px;
text-shadow: none;
margin: 0 20px;
background-color: #3d3d3d;
background-color: #171717;
@include border-radius(0 0 5px 5px);
@include box-shadow(0 5px 30px rgba(0,0,0,.3));
}
@@ -333,7 +330,7 @@ footer {
.free-hosting {
.pane {
background-color: #444;
background-color: #3e3e3e;
@include border-radius(10px);
text-shadow: none;
position: relative;
@@ -483,7 +480,7 @@ aside {
@include border-radius(5px);
/*border: 1px solid #333;*/
@include box-shadow(0 1px 3px rgba(0,0,0,.3), inset 0 1px 1px rgba(255,255,255,.5));
background-color: #777;
background-color: #767676;
}
a:hover {
@@ -597,7 +594,7 @@ article h2:first-child { margin-top: 0; }
.post-meta {
padding: 5px 0;
color: #aaa;
color: #c0c0c0;
font-weight: 600;
text-shadow: 0 -1px 0 #000;
}
@@ -635,7 +632,7 @@ p > nobr > code,
li > code,
h5 > code,
.note > code {
background-color: #333;
background-color: #2b2b2b;
color: #fff;
@include border-radius(5px);
@include box-shadow(inset 0 1px 10px rgba(0,0,0,.3),
@@ -971,3 +968,18 @@ code.output {
display: inline !important;
}
}
/* Helper class taken from Bootstrap.
Hides an element to all devices except screen readers.
*/
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}

View File

@@ -38,7 +38,7 @@ overview: true
<section class="quickstart">
<div class="grid">
<div class="unit golden-small center-on-mobiles">
<h4>Get up and running <em>in&nbsp;seconds</em>.</h4>
<h3>Get up and running <em>in&nbsp;seconds</em>.</h3>
</div>
<div class="unit golden-large code">
<p class="title">Quick-start Instructions</p>

44
test/loader.rb Normal file
View File

@@ -0,0 +1,44 @@
# Yoinked lovingly from Rake's source code.
#
# Copyright (c) Jim Weirich
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
require 'rake'
# Load the test files from the command line.
argv = ARGV.select do |argument|
case argument
when /^-/ then
argument
when /\*/ then
FileList[argument].to_a.each do |file|
require File.expand_path file
end
false
else
require File.expand_path argument
false
end
end
ARGV.replace argv

View File

@@ -1 +1 @@
/tmp
../../../tmp/

View File

@@ -1,5 +0,0 @@
---
title: Test Post Where YAML Ends in Dots
...
# Test

View File

@@ -26,4 +26,4 @@ Partial variable test
Relative to self test:
- 9 {% include_relative 2014-03-03-yaml-with-dots.md %}
- 9 {% include_relative 2010-01-08-triple-dash.markdown %}

View File

@@ -14,7 +14,7 @@ class TestGeneratedSite < Test::Unit::TestCase
end
should "ensure post count is as expected" do
assert_equal 44, @site.posts.size
assert_equal 43, @site.posts.size
end
should "insert site.posts into the index" do

View File

@@ -165,18 +165,6 @@ class TestPost < Test::Unit::TestCase
end
end
context "with three dots ending YAML header" do
setup do
@real_file = "2014-03-03-yaml-with-dots.md"
end
should "should read the YAML header" do
@post.read_yaml(@source, @real_file)
assert_equal({"title" => "Test Post Where YAML Ends in Dots"},
@post.data)
end
end
context "with embedded triple dash" do
setup do
@real_file = "2010-01-08-triple-dash.markdown"

View File

@@ -174,6 +174,46 @@ CONTENT
end
end
context "post content has highlight tag with preceding spaces & lines" do
setup do
fill_post <<-EOS
[,1] [,2]
[1,] FALSE TRUE
[2,] FALSE TRUE
EOS
end
should "only strip the preceding newlines" do
assert_match %{<pre><code class=\"language-text\" data-lang=\"text\"> [,1] [,2]}, @result
end
end
context "post content has highlight tag with preceding spaces & Windows-style newlines" do
setup do
fill_post "\r\n\r\n\r\n [,1] [,2]"
end
should "only strip the preceding newlines" do
assert_match %{<pre><code class=\"language-text\" data-lang=\"text\"> [,1] [,2]}, @result
end
end
context "post content has highlight tag with only preceding spaces" do
setup do
fill_post <<-EOS
[,1] [,2]
[1,] FALSE TRUE
[2,] FALSE TRUE
EOS
end
should "only strip the preceding newlines" do
assert_match %{<pre><code class=\"language-text\" data-lang=\"text\"> [,1] [,2]}, @result
end
end
context "simple post with markdown and pre tags" do
setup do
@content = <<CONTENT
@@ -319,7 +359,7 @@ CONTENT
context "with symlink'd include" do
should "not allow symlink includes" do
File.open("/tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
File.open("tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
assert_raise IOError do
content = <<CONTENT
---
@@ -610,7 +650,7 @@ CONTENT
context "with symlink'd include" do
should "not allow symlink includes" do
File.open("/tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
File.open("tmp/pages-test", 'w') { |file| file.write("SYMLINK TEST") }
assert_raise IOError do
content = <<CONTENT
---