diff --git a/lib/site_template/_layouts/post.html b/lib/site_template/_layouts/post.html index 3a0fb52e..2592391f 100644 --- a/lib/site_template/_layouts/post.html +++ b/lib/site_template/_layouts/post.html @@ -4,7 +4,7 @@ layout: default
-

{{ page.title }}

+

{{ page.title | escape }}

diff --git a/lib/site_template/_sass/_base.scss b/lib/site_template/_sass/_base.scss index 0883c3cd..9b8f292d 100644 --- a/lib/site_template/_sass/_base.scss +++ b/lib/site_template/_sass/_base.scss @@ -177,13 +177,10 @@ pre { /** * Clearfix */ -%clearfix { - - &:after { - content: ""; - display: table; - clear: both; - } +%clearfix:after { + content: ""; + display: table; + clear: both; } @@ -191,16 +188,13 @@ pre { /** * Icons */ -.icon { +.icon > svg { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; - > svg { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - - path { - fill: $grey-color; - } + path { + fill: $grey-color; } } diff --git a/lib/site_template/index.html b/lib/site_template/index.html index 83d93985..9fbc9b70 100644 --- a/lib/site_template/index.html +++ b/lib/site_template/index.html @@ -12,7 +12,7 @@ layout: default

- {{ post.title }} + {{ post.title | escape }}

{% endfor %} diff --git a/rake/site.rake b/rake/site.rake index 08ad12b3..3bff7a16 100644 --- a/rake/site.rake +++ b/rake/site.rake @@ -5,7 +5,7 @@ ############################################################################# namespace :site do - task :generated_pages => [:history, :version_file, :conduct] + task :generated_pages => [:history, :version_file, :conduct, :contributing] desc "Generate and view the site locally" task :preview => :generated_pages do @@ -103,41 +103,21 @@ namespace :site do desc "Create a nicely formatted history page for the jekyll site based on the repo history." task :history do - if File.exist?("History.markdown") - history_file = File.read("History.markdown") - front_matter = { - "layout" => "docs", - "title" => "History", - "permalink" => "/docs/history/" - } - Dir.chdir('site/_docs/') do - File.open("history.md", "w") do |file| - file.write("#{front_matter.to_yaml}---\n\n") - file.write(converted_history(history_file)) - end - end - else - abort "You seem to have misplaced your History.markdown file. I can haz?" - end + siteify_file('History.markdown') end desc "Copy the Code of Conduct" task :conduct do - code_of_conduct = File.read("CONDUCT.markdown") - header, _, body = code_of_conduct.partition("\n\n") front_matter = { - "layout" => "docs", - "title" => header.sub('# Contributor ', ''), - "permalink" => "/docs/conduct/", "redirect_from" => "/conduct/index.html", "editable" => false } - Dir.chdir('site/_docs') do - File.open("conduct.md", "w") do |file| - file.write("#{front_matter.to_yaml}---\n\n") - file.write(body) - end - end + siteify_file('CONDUCT.markdown', front_matter) + end + + desc "Copy the contributing file" + task :contributing do + siteify_file('.github/CONTRIBUTING.markdown') end desc "Write the site latest_version.txt file" diff --git a/script/proof b/script/proof index 01da5016..a5de7fd6 100755 --- a/script/proof +++ b/script/proof @@ -14,6 +14,7 @@ INGORE_HREFS=$(ruby -e 'puts %w{ twitter.com nearlyfreespeech.net eduardoboucas.com + github.com\/matrix9180 }.map{|h| "/#{h}/"}.join(",")') SOURCE="site" DESTINATION="_site" @@ -31,4 +32,4 @@ bundle exec jekyll build -s $SOURCE -d $DESTINATION --trace # 3. msg "Proofing..." -time bundle exec htmlproof ./$DESTINATION --href-ignore $INGORE_HREFS +time bundle exec htmlproof ./$DESTINATION --url-ignore $INGORE_HREFS diff --git a/site/_docs/conduct.md b/site/_docs/conduct.md index d25c32c9..b5420b47 100644 --- a/site/_docs/conduct.md +++ b/site/_docs/conduct.md @@ -1,9 +1,10 @@ --- -layout: docs -title: Code of Conduct -permalink: "/docs/conduct/" redirect_from: "/conduct/index.html" editable: false +title: Code of Conduct +layout: docs +permalink: "/docs/conduct/" +note: This file is autogenerated. Edit /CONDUCT.markdown instead. --- As contributors and maintainers of this project, and in the interest of diff --git a/site/_docs/contributing.md b/site/_docs/contributing.md index a5654bdd..51942fab 100644 --- a/site/_docs/contributing.md +++ b/site/_docs/contributing.md @@ -1,7 +1,8 @@ --- -layout: docs title: Contributing -permalink: /docs/contributing/ +layout: docs +permalink: "/docs/contributing/" +note: This file is autogenerated. Edit /.github/CONTRIBUTING.markdown instead. --- So you've got an awesome idea to throw into Jekyll. Great! Please keep the @@ -27,38 +28,29 @@ following in mind: change is to review, the more likely it will be merged. * When submitting a pull request, please make judicious use of the pull request body. A description of what changes were made, the motivations behind the - changes, and [any tasks completed or left to complete](http://git.io/gfm-tasks) + changes and [any tasks completed or left to complete](http://git.io/gfm-tasks) will also speed up review time. -
-
Contributions will not be accepted without tests
-

- If you’re creating a small fix or patch to an existing feature, just - a simple test will do. -

-
- - Test Dependencies ----------------- To run the test suite and build the gem you'll need to install Jekyll's -dependencies. Simply run this command to get all set up: +dependencies. Simply run this command to get all setup: -
$ script/bootstrap
+ $ script/bootstrap Before you start, run the tests and make sure that they pass (to confirm your environment is configured properly): -
$ script/cibuild
+ $ script/cibuild If you are only updating a file in `test/`, you can use the command: -
$ script/test test/blah_test.rb
+ $ script/test test/blah_test.rb If you are only updating a `.feature` file, you can use the command: -
$ script/cucumber features/blah.feature
+ $ script/cucumber features/blah.feature Both `script/test` and `script/cucumber` can be run without arguments to run its entire respective suite. @@ -68,7 +60,7 @@ Workflow Here's the most direct way to get your work merged into the project: -* Fork the project. +* [Fork](https://github.com/jekyll/jekyll/fork) the project. * Clone down your fork ( `git clone git@github.com:[username]/jekyll.git` ). * Create a topic branch to contain your change ( `git checkout -b my_awesome_feature` ). * Hack away, add tests. Not necessarily in that order. @@ -86,18 +78,19 @@ open-sourced our docs and we welcome any pull requests if you find it lacking. You can find the documentation for jekyllrb.com in the -[site]({{ site.repository }}/tree/master/site) directory of +[site](https://github.com/jekyll/jekyll/tree/master/site) directory of Jekyll's repo on GitHub.com. All documentation pull requests should be directed at `master`. Pull requests directed at another branch will not be accepted. -The [Jekyll wiki]({{ site.repository }}/wiki) on GitHub +The [Jekyll wiki](https://github.com/jekyll/jekyll/wiki) on GitHub can be freely updated without a pull request as all GitHub users have access. -If you want to add your plugin to the [list of plugins](/docs/plugins/#available-plugins), -please submit a pull request modifying the [plugins page source -file]({{ site.repository }}/blob/master/site/_docs/plugins.md) by adding a +If you want to add your plugin to the +[list of plugins](http://jekyllrb.com/docs/plugins/#available-plugins), +please submit a pull request modifying the +[plugins page source file](site/_docs/plugins.md) by adding a link to your plugin under the proper subheading depending upon its type. Gotchas @@ -113,12 +106,5 @@ Gotchas Finally... ---------- -
-
Let us know what could be better!
-

- Both using and hacking on Jekyll should be fun, simple, and easy, so if for - some reason you find it’s a pain, please create an issue on - GitHub describing your experience so we can make it better. -

-
+Thanks! Hacking on Jekyll should be fun. If you find any of this hard to figure +out, let us know so we can improve our process or documentation! diff --git a/site/_docs/deployment-methods.md b/site/_docs/deployment-methods.md index c5c4f750..f10b48b7 100644 --- a/site/_docs/deployment-methods.md +++ b/site/_docs/deployment-methods.md @@ -219,3 +219,9 @@ Use [Kickster](http://kickster.nielsenramon.com/) for easy (automated) deploys t Kickster provides a basic Jekyll project setup packed with web best practises and useful optimization tools increasing your overall project quality. Kickster ships with automated and worry-free deployment scripts for GitHub Pages. Setting up Kickster is very easy, just install the gem and you are good to go. More documentation can here found [here](https://github.com/nielsenramon/kickster#kickster). If you do not want to use the gem or start a new project you can just copy paste the deployment scripts for [Travis CI](https://github.com/nielsenramon/kickster/tree/master/snippets/travis) or [Circle CI](https://github.com/nielsenramon/kickster#automated-deployment-with-circle-ci). + +## Aerobatic + +[Aerobatic](https://www.aerobatic.com) is an add-on for Bitbucket that brings GitHub Pages style functionality to Bitbucket users. It includes continuous deployment, custom domains with a wildcard SSL cert, CDN, basic auth, and staging branches all in the box. + +Automating the build and deployment of a Jekyll site is just as simple as GitHub Pages - push your changes to your repo (excluding the `_site` directory) and within seconds a build will be triggered and your built site deployed to our highly- available, globally distributed hosting service. The build process will even install and execute custom Ruby plugins. See our [Jekyll docs](https://www.aerobatic.com/docs/static-generators#jekyll) for more details. diff --git a/site/_docs/extras.md b/site/_docs/extras.md index 708d8718..5abd0d73 100644 --- a/site/_docs/extras.md +++ b/site/_docs/extras.md @@ -15,7 +15,7 @@ Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](ht {% endhighlight %} -For more information about getting started, check out [this excellent blog post](https://gastonsanchez.com/opinion/2014/02/16/Mathjax-with-jekyll/). +For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/opinion/2014/02/16/Mathjax-with-jekyll/). ## Alternative Markdown Processors diff --git a/site/_docs/history.md b/site/_docs/history.md index b98ea83e..12da9d24 100644 --- a/site/_docs/history.md +++ b/site/_docs/history.md @@ -1,7 +1,8 @@ --- -layout: docs title: History +layout: docs permalink: "/docs/history/" +note: This file is autogenerated. Edit /History.markdown instead. --- ## 3.1.2 / 2016-02-19 diff --git a/site/_docs/plugins.md b/site/_docs/plugins.md index a8953f91..932fd204 100644 --- a/site/_docs/plugins.md +++ b/site/_docs/plugins.md @@ -845,6 +845,7 @@ LESS.js files during generation. - [Jekyll-Youtube](https://github.com/dommmel/jekyll-youtube) A Liquid tag that embeds Youtube videos. The default emded markup is responsive but you can also specify your own by using an include/partial. - [Jekyll Flickr Plugin](https://github.com/lawmurray/indii-jekyll-flickr) by [Lawrence Murray](http://www.indii.org): Embeds Flickr photosets (albums) as a gallery of thumbnails, with lightbox links to larger images. - [jekyll-figure](https://github.com/paulrobertlloyd/jekyll-figure): A liquid tag for Jekyll that generates `
` elements. +- [Jekyll Video Embed](https://github.com/eug/jekyll-video-embed): It provides several tags to easily embed videos (e.g. Youtube, Vimeo, UStream and Ted Talks) #### Collections diff --git a/site/_docs/resources.md b/site/_docs/resources.md index 2ba5f25e..261100f0 100644 --- a/site/_docs/resources.md +++ b/site/_docs/resources.md @@ -14,7 +14,7 @@ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, ext - [Blogging with Git, Emacs and Jekyll](http://metajack.im/2009/01/23/blogging-with-git-emacs-and-jekyll/) - [Tips for working with GitHub Pages Integration](https://gist.github.com/jedschneider/2890453) -### Integrations +### Integrations - [Use FormKeep as a backend for forms (contact forms, hiring forms, etc.)](https://formkeep.com/guides/how-to-make-a-contact-form-in-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll) - [Use Simple Form to add a simple contact form](http://getsimpleform.com/) @@ -24,7 +24,7 @@ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, ext ### Other commentary -- [‘My Jekyll Fork’, by Mike West](http://mikewest.org/2009/11/my-jekyll-fork) +- [‘My Jekyll Fork’, by Mike West](https://mikewest.org/2009/11/my-jekyll-fork) > “Jekyll is a well-architected throwback to a time before WordPress, when men were men, and HTML was static. I like the ideas it espouses, and have made a few improvements to it’s core. Here, I’ll point out some highlights of my fork in the hopes that they see usage beyond this site.” diff --git a/site/help/index.md b/site/help/index.md index ba159599..11213471 100644 --- a/site/help/index.md +++ b/site/help/index.md @@ -5,12 +5,20 @@ title: Getting Help Need help with Jekyll? Try these resources. -### [Upgrading Documentation](/docs/upgrading/) +### [Upgrading](/docs/upgrading/) Did you recently upgrade from Jekyll 1 to 2 or from Jekyll 2 to 3? Known breaking changes are listed in the upgrading docs. -### [Google](https://google.com) +### [Documentation](/docs/home/) + +Our guide to Jekyll covering installation, writing, customization, deployment, and more. + +### [View source](https://github.com/jekyll/jekyll/wiki/sites) + +Learn from the source of others' Jekyll-powered sites. + +### [Google](https://www.google.com/?q=jekyll) Add **jekyll** to almost any query, and you'll find just what you need. diff --git a/test/source/_methods/collection/entries b/test/source/_methods/collection/entries new file mode 100644 index 00000000..7622ac9a --- /dev/null +++ b/test/source/_methods/collection/entries @@ -0,0 +1,5 @@ +--- +title: "Collection#entries" +--- + +I have no file extension but I should still be a part of the collection. diff --git a/test/test_collections.rb b/test/test_collections.rb index d6d7d7de..1faef26e 100644 --- a/test/test_collections.rb +++ b/test/test_collections.rb @@ -126,6 +126,7 @@ class TestCollections < JekyllUnitTest assert_includes %w[ _methods/configuration.md _methods/sanitized_path.md + _methods/collection/entries _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md diff --git a/test/test_document.rb b/test/test_document.rb index 1197c4da..d3fac02f 100644 --- a/test/test_document.rb +++ b/test/test_document.rb @@ -12,7 +12,7 @@ class TestDocument < JekyllUnitTest "collections" => ["methods"] }) @site.process - @document = @site.collections["methods"].docs.first + @document = @site.collections["methods"].docs.detect {|d| d.relative_path == "_methods/configuration.md" } end should "exist" do @@ -49,7 +49,7 @@ class TestDocument < JekyllUnitTest setup do @site = fixture_site({"collections" => ["methods"]}) @site.process - @document = @site.collections["methods"].docs.last + @document = @site.collections["methods"].docs.detect {|d| d.relative_path == "_methods/yaml_with_dots.md" } end should "know its data" do diff --git a/test/test_filters.rb b/test/test_filters.rb index e9035b96..d8bce740 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -103,6 +103,13 @@ class TestFilters < JekyllUnitTest should "format a time according to RFC-822" do assert_equal "Wed, 27 Mar 2013 11:22:33 +0000", @filter.date_to_rfc822(@sample_time) end + + should "not modify a time in-place when using filters" do + t = Time.new(2004, 9, 15, 0, 2, 37, "+01:00") + assert_equal 3600, t.utc_offset + @filter.date_to_string(t) + assert_equal 3600, t.utc_offset + end end context "with Date object" do @@ -289,6 +296,14 @@ class TestFilters < JekyllUnitTest end end end + + should "include the size of each grouping" do + grouping = @filter.group_by(@filter.site.pages, "layout") + grouping.each do |g| + p g + assert_equal g["items"].size, g["size"], "The size property for '#{g["name"]}' doesn't match the size of the Array." + end + end end context "where filter" do diff --git a/test/test_kramdown.rb b/test/test_kramdown.rb index fc18c4ce..c9316936 100644 --- a/test/test_kramdown.rb +++ b/test/test_kramdown.rb @@ -14,6 +14,7 @@ class TestKramdown < JekyllUnitTest 'auto_ids' => false, 'footnote_nr' => 1, + 'syntax_highlighter' => 'rouge', 'syntax_highlighter_opts' => { 'bold_every' => 8, 'css' => :class }