Compare commits

..

51 Commits

Author SHA1 Message Date
Pat Hawks
b0c591a3f2 Add Inline Markdown converter 2016-10-27 20:30:32 -05:00
David Stosik
167af4552b Avoid modifying existing test's behavior in my PR 2016-10-24 01:03:53 +09:00
David Stosik
3cc4bef2e6 Fix Rubocop errors 2016-10-24 00:39:09 +09:00
David Stosik
4785f6f71f Provide an "inline" mode to markdownify filter 2016-10-24 00:01:09 +09:00
jekyllbot
12a86c1298 Update history to reflect merge of #5504 [ci skip] 2016-10-21 13:58:47 -07:00
jekyllbot
0ce9d726f5 Merge pull request #5504 from baiyangcao/patch-2
Merge pull request 5504
2016-10-21 13:58:47 -07:00
baiyangcao
d6844d284c Update deployment-methods.md 2016-10-21 13:30:26 +08:00
jekyllbot
4d597643ec Update history to reflect merge of #5502 [ci skip] 2016-10-20 13:12:08 -07:00
jekyllbot
343d5f7be5 Merge pull request #5502 from DirtyF/docs-jekyll-hook-outdated
Merge pull request 5502
2016-10-20 13:12:07 -07:00
Frank Taillandier
11a0b6578e Remove jekyll-hook from deployment methods 2016-10-20 21:12:16 +02:00
jekyllbot
3431c9f7b8 Update history to reflect merge of #5495 [ci skip] 2016-10-19 21:24:11 -07:00
jekyllbot
eca7f46749 Merge pull request #5495 from jekyll/pr/layouts-error
Merge pull request 5495
2016-10-19 21:24:11 -07:00
jekyllbot
821a845166 Update history to reflect merge of #5496 [ci skip] 2016-10-19 12:10:11 -07:00
jekyllbot
d979b4bf9b Merge pull request #5496 from jekyll/pr/rubocop
Merge pull request 5496
2016-10-19 12:10:11 -07:00
jekyllbot
124c63fd59 Update history to reflect merge of #5492 [ci skip] 2016-10-19 10:58:48 -07:00
jekyllbot
89bbb249af Merge pull request #5492 from tnhu/patch-2
Merge pull request 5492
2016-10-19 10:58:48 -07:00
jekyllbot
344d07cb55 Update history to reflect merge of #5497 [ci skip] 2016-10-19 10:40:43 -07:00
jekyllbot
0484986c16 Merge pull request #5497 from kingscott/master
Merge pull request 5497
2016-10-19 10:40:42 -07:00
Scott King
c7d0dda5a7 Add comment about gem outdated 2016-10-19 09:40:43 -04:00
Tan Nhu
ea72f98609 Fix typo 2016-10-19 00:53:44 -07:00
jekyllbot
0f5c34d16d Update history to reflect merge of #5494 [ci skip] 2016-10-18 18:38:14 -07:00
jekyllbot
0d8e21f779 Merge pull request #5494 from jekyll/pr/gsub
Merge pull request 5494
2016-10-18 18:38:13 -07:00
Scott King
2be5d56059 Fix some typos 2016-10-18 21:32:40 -04:00
Scott King
e6829b5949 Fix some typos 2016-10-18 21:15:50 -04:00
Scott King
8a4edc550b Add info about checking version + updating 2016-10-18 21:07:58 -04:00
Pat Hawks
cc1972848d Restrict Rubocop version 2016-10-18 19:51:54 -05:00
Pat Hawks
51d9be83a1 Do not swallow all exceptions on render 2016-10-18 19:45:03 -05:00
Pat Hawks
c4a23b4ced Collapse gsub 2016-10-18 18:53:54 -05:00
Tan Nhu
b9275920dd Update jekyll-include-absolute-plugin description 2016-10-18 09:52:57 -07:00
jekyllbot
53d20bc77e Update history to reflect merge of #5479 [ci skip] 2016-10-18 09:51:45 -07:00
jekyllbot
7aa9c3f12c Merge pull request #5479 from ashmaroli/test-script
Merge pull request 5479
2016-10-18 09:51:45 -07:00
Tan Nhu
00e3c979c9 Add jekyll-include-absolute-plugin 2016-10-18 09:51:16 -07:00
jekyllbot
0a1c837755 Update history to reflect merge of #5489 [ci skip] 2016-10-18 09:50:50 -07:00
jekyllbot
7c901baac1 Merge pull request #5489 from ashmaroli/rubocop-fix
Merge pull request 5489
2016-10-18 09:50:49 -07:00
jekyllbot
1f9c2b1380 Update history to reflect merge of #5491 [ci skip] 2016-10-18 09:49:12 -07:00
jekyllbot
146d5930a4 Merge pull request #5491 from ashmaroli/patch-1
Merge pull request 5491
2016-10-18 09:49:12 -07:00
ashmaroli
6ec86f4207 Add jekyll-data to the list of plugins 2016-10-18 16:20:41 +05:30
Ashwin Maroli
d1f67bf85a fix rubocop errors on testing with Rubocop 0.44
- have the new `Metrics/BlockLength` cop ignore test files and
    `jekyll/configuration.rb`
  - have `AllCops` ignore Jekyll Executable which is not going to be
    altered in the near future.
2016-10-17 13:24:54 +05:30
jekyllbot
c9d24b7d18 Update history to reflect merge of #5472 [ci skip] 2016-10-12 17:53:51 -07:00
jekyllbot
62ec32c883 Merge pull request #5472 from codethebeard/patch-1
Merge pull request 5472
2016-10-12 17:53:51 -07:00
jekyllbot
aa97be3ab5 Update history to reflect merge of #5471 [ci skip] 2016-10-12 15:34:51 -07:00
jekyllbot
389bbe1621 Merge pull request #5471 from chrisfinazzo/normalize-css-v5
Merge pull request 5471
2016-10-12 15:34:50 -07:00
Ashwin Maroli
0d12a02893 script/test: add missing whitespace 2016-10-12 14:35:39 +05:30
jekyllbot
d4b7b44328 Update history to reflect merge of #5475 [ci skip] 2016-10-11 08:46:53 -07:00
Michael Large
6cec4aebc6 Additional typo related to pull request #5472 2016-10-11 09:05:39 -04:00
Michael Large
f2fcd17627 Fix typo in theme_template README 2016-10-10 11:10:41 -04:00
chrisfinazzo
c569edcf0a Update normalize.css to v5.0.0 2016-10-09 11:36:04 -04:00
jekyllbot
53d472b7e2 Update history to reflect merge of #5449 [ci skip] 2016-10-06 11:45:20 -07:00
jekyllbot
f93e40209c Merge pull request #5449 from DirtyF/docs-link-tag
Merge pull request 5449
2016-10-06 11:45:19 -07:00
Frank Taillandier
c61752a336 Fix line length 2016-10-06 01:17:26 +02:00
Parker Moore
fcef78c4b6 Revert "templates.md: {% link %} tag only accepts collection documents"
This reverts commit ab4abb1933.
2016-10-06 01:13:18 +02:00
17 changed files with 140 additions and 34 deletions

View File

@@ -6,6 +6,7 @@ AllCops:
Exclude:
- lib/jekyll/renderer.rb
- bin/**/*
- exe/**/*
- benchmark/**/*
- script/**/*
- vendor/**/*
@@ -17,6 +18,10 @@ Lint/UselessAccessModifier:
Enabled: false
Metrics/AbcSize:
Max: 21
Metrics/BlockLength:
Exclude:
- test/**/*.rb
- lib/jekyll/configuration.rb
Metrics/ClassLength:
Exclude:
- !ruby/regexp /features\/.*.rb$/
@@ -34,6 +39,8 @@ Metrics/MethodLength:
Max: 20
Severity: error
Metrics/ModuleLength:
Exclude:
- lib/jekyll/filters.rb
Max: 240
Metrics/ParameterLists:
Max: 4

View File

@@ -18,7 +18,7 @@ end
#
group :test do
gem "rubocop"
gem "rubocop", "~> 0.44.1"
gem "cucumber", "~> 2.1"
gem "jekyll_test_plugin"
gem "jekyll_test_plugin_malicious"

View File

@@ -1,3 +1,31 @@
## HEAD
### Site Enhancements
* Documentation: {% link %} tag (#5449)
* Updating install instruction link for Jekyll 3 on Windows (#5475)
* Update normalize.css to v5.0.0 (#5471)
* Add jekyll-data to the list of plugins (#5491)
* Add info about checking version + updating (#5497)
* Add jekyll-include-absolute-plugin to list of third-party plugins (#5492)
* Remove jekyll-hook from deployment methods (#5502)
* Update deployment-methods.md (#5504)
### Bug Fixes
* Fix typo in theme_template README (#5472)
* Do not swallow all exceptions on render (#5495)
### Development Fixes
* fix rubocop errors on testing with Rubocop 0.44 (#5489)
* script/test: add missing whitespace (#5479)
* Restrict Rubocop version (#5496)
### Minor Enhancements
* Collapse `gsub` (#5494)
## 3.3.0 / 2016-10-06
### Minor Enhancements

View File

@@ -63,6 +63,18 @@ Feature: Embed filters
And the _site directory should exist
And I should see "By <p><em>Obi-wan</em></p>" in "_site/2009/03/27/star-wars.html"
Scenario: Markdownify a given inline string
Given I have a _posts directory
And I have a _layouts directory
And I have the following post:
| title | date | layout | content |
| Star Wars | 2009-03-27 | default | These aren't the droids you're looking for. |
And I have a default layout that contains "By {{ '_Obi-wan_' | markdownify:'inline' }}"
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "By <em>Obi-wan</em>" in "_site/2009/03/27/star-wars.html"
Scenario: Sort by an arbitrary variable
Given I have a _layouts directory
And I have the following page:

View File

@@ -0,0 +1,35 @@
class Kramdown::Parser::Inline < Kramdown::Parser::Kramdown
def initialize(source, options)
super
@block_parsers = [:block_html].freeze
end
end
module Jekyll
module Converters
class Markdown
class Inline < Converter
safe true
priority :low
def initialize(config)
Jekyll::External.require_with_graceful_fail "kramdown"
@config = config["kramdown"].dup || {}
@config[:input] = :Inline
end
def matches(_)
false
end
def output_ext(_)
nil
end
def convert(content)
Kramdown::Document.new(content, @config).to_html.chomp
end
end
end
end
end

View File

@@ -13,9 +13,13 @@ module Jekyll
# input - The Markdown String to convert.
#
# Returns the HTML formatted String.
def markdownify(input)
def markdownify(input, mode = nil)
site = @context.registers[:site]
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
if mode.to_s == "inline"
converter = site.find_converter_instance(Jekyll::Converters::Markdown::Inline)
else
converter = site.find_converter_instance(Jekyll::Converters::Markdown)
end
converter.convert(input.to_s)
end

View File

@@ -188,7 +188,7 @@ module Jekyll
if path.nil? || path.empty?
""
else
path.gsub(%r!\A/!, "").gsub(%r!([^/])\z!, '\1')
path.gsub(%r!\A/|(?<=[^/])\z!, "".freeze)
end
end
end

View File

@@ -62,8 +62,7 @@ module Jekyll
end
def sanitize_filename(name)
name.gsub!(%r![^\w\s-]+!, "")
name.gsub!(%r!(^|\b\s)\s+($|\s?\b)!, '\\1\\2')
name.gsub!(%r![^\w\s-]+|(?<=^|\b\s)\s+(?=$|\s?\b)!, "".freeze)
name.gsub(%r!\s+!, "_")
end
end

View File

@@ -191,11 +191,7 @@ module Jekyll
render_pages(payload)
Jekyll::Hooks.trigger :site, :post_render, self, payload
# rubocop: disable HandleExceptions
rescue Errno::ENOENT
# ignore missing layout dir
end
# rubocop: enable HandleExceptions
# Remove orphaned files and empty directories in destination.
#

View File

@@ -38,7 +38,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
To set up your environment to develop this theme, run `bundle install`.
You theme is setup just like a normal Jelyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.

View File

@@ -50,7 +50,7 @@ for ruby in $rubies; do
rake TESTOPTS=$testopts test
else
set -x
time $ruby -S bundle exec ruby -Itest \
time $ruby -S bundle exec ruby -I test \
"$@" $testops
fi
done

View File

@@ -72,19 +72,6 @@ Deploying is now as easy as telling nginx or Apache to look at
laptops$ git push deploy master
```
### Jekyll-hook
You can also use jekyll-hook, a server that listens for webhook posts from
GitHub, generates a website with Jekyll, and moves it somewhere to be
published. Use this to run your own GitHub Pages-style web server.
This method is useful if you need to serve your websites behind a firewall,
need extra server-level features like HTTP basic authentication or want to
host your site directly on a CDN or file host like S3.
Setup steps are fully documented
[in the `jekyll-hook` repo](https://github.com/developmentseed/jekyll-hook).
### Static Publisher
[Static Publisher](https://github.com/static-publisher/static-publisher) is another automated deployment option with a server listening for webhook posts, though it's not tied to GitHub specifically. It has a one-click deploy to Heroku, it can watch multiple projects from one server, it has an easy to user admin interface and can publish to either S3 or to a git repository (e.g. gh-pages).
@@ -102,7 +89,7 @@ Once youve generated the `_site` directory, you can easily scp it using a
need to change the values to reflect your sites details. There is even [a
matching TextMate command][] that will help you run this script.
[this deploy script here]: https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy
[this deploy script]: https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy
[a matching TextMate command]: https://gist.github.com/henrik/214959

View File

@@ -103,4 +103,25 @@ Check out [the extras page](../extras/) for more information.
</p>
</div>
Now that youve got everything installed, lets get to work!
## Already Have Jekyll?
Before you start developing with Jekyll, you may want to check that you're up to date with the latest version. To find your version of Jekyll, run one of these commands:
```sh
$ jekyll --version
$ gem list jekyll
```
You can also use [RubyGems](https://rubygems.org/gems/jekyll) to find the current versioning of any gem. But you can also use the `gem` command line tool:
```sh
$ gem search jekyll --remote
```
and you'll search for just the name `jekyll`, and in brackets will be latest version. Another way to check if you have the latest version is to run the command `gem outdated`. This will provide a list of all the gems on your system that need to be updated. If you aren't running the latest version, run this command:
```sh
$ gem update jekyll
```
Now that youve got everything up-to-date and installed, lets get to work!

View File

@@ -866,6 +866,7 @@ LESS.js files during generation.
- [Jekyll Tags List Plugin](https://github.com/crispgm/jekyll-tags-list-plugin): A Liquid tag plugin that creates tags list in specific order.
- [Jekyll Maps](https://github.com/ayastreb/jekyll-maps) by [Anatoliy Yastreb](https://github.com/ayastreb): A Jekyll plugin to easily embed maps with filterable locations.
- [Jekyll Cloudinary](https://nhoizey.github.io/jekyll-cloudinary/) by [Nicolas Hoizey](https://nicolas-hoizey.com/): a Jekyll plugin adding a Liquid tag to ease the use of Cloudinary for responsive images in your Markdown/Kramdown posts.
- [jekyll-include-absolute-plugin](https://github.com/tnhu/jekyll-include-absolute-plugin) by [Tan Nhu](https://github.com/tnhu): A Jekyll plugin to include a file from its path relative to Jekyll's source folder.
#### Collections
@@ -912,6 +913,7 @@ LESS.js files during generation.
- [generator-jekyllized](https://github.com/sondr3/generator-jekyllized): A Yeoman generator for rapidly developing sites with Gulp. Live reload your site, automatically minify and optimize your assets and much more.
- [Jekyll-Spotify](https://github.com/MertcanGokgoz/Jekyll-Spotify): Easily output Spotify Embed Player for jekyll
- [jekyll-menus](https://github.com/forestryio/jekyll-menus): Hugo style menus for your Jekyll site... recursive menus included.
- [jekyll-data](https://github.com/ashmaroli/jekyll-data): Read data files within Jekyll Theme Gems.
#### Editors

View File

@@ -510,9 +510,9 @@ numbers from the highlighted code.
### Link
If you would like to include a link to a collection's document, or a post
the `link` tag will generate the correct permalink URL for the path you
specify.
If you want to include a link to a collection's document, a post, a page
or a file the `link` tag will generate the correct permalink URL for the path
you specify.
You must include the file extension when using the `link` tag.
@@ -520,6 +520,8 @@ You must include the file extension when using the `link` tag.
{% raw %}
{% link _collection/name-of-document.md %}
{% link _posts/2016-07-26-name-of-post.md %}
{% link news/index.html %}
{% link /assets/files/doc.pdf %}
{% endraw %}
```
@@ -529,12 +531,11 @@ You can also use this tag to create a link in Markdown as follows:
{% raw %}
[Link to a document]({% link _collection/name-of-document.md %})
[Link to a post]({% link _posts/2016-07-26-name-of-post.md %})
[Link to a page]({% link news/index.html %})
[Link to a file]({% link /assets/files/doc.pdf %})
{% endraw %}
```
Support for static files and pages is coming in a later release but is
**not** released as of v3.2.1.
### Post URL
If you would like to include a link to a post on your site, the `post_url` tag

View File

@@ -1 +1 @@
/*! normalize.css v4.2.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}template,[hidden]{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,optgroup,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:0.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}
/*! normalize.css v5.0.0 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:0.67em 0}figcaption,figure,main{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace, monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,html [type="button"],[type="reset"],[type="submit"]{-webkit-appearance:button}button::-moz-focus-inner,[type="button"]::-moz-focus-inner,[type="reset"]::-moz-focus-inner,[type="submit"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type="button"]:-moz-focusring,[type="reset"]:-moz-focusring,[type="submit"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}[type="checkbox"],[type="radio"]{box-sizing:border-box;padding:0}[type="number"]::-webkit-inner-spin-button,[type="number"]::-webkit-outer-spin-button{height:auto}[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}[type="search"]::-webkit-search-cancel-button,[type="search"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}canvas{display:inline-block}template{display:none}[hidden]{display:none}

View File

@@ -57,6 +57,20 @@ class TestFilters < JekyllUnitTest
)
end
should "markdownify with simple string in inline mode" do
assert_equal(
"one <em>simple</em> string",
@filter.markdownify("one _simple_ string", :inline)
)
end
should "markdownify with multi-line string in inline mode" do
assert_equal(
"first line\nsecond line",
@filter.markdownify("first line\n\nsecond line", :inline)
)
end
context "smartify filter" do
should "convert quotes and typographic characters" do
assert_equal(