Compare commits

..

55 Commits

Author SHA1 Message Date
Parker Moore
6927aa996e Release 💎 3.1.6 2016-05-19 12:46:59 -07:00
Parker Moore
a7ee0af406 Merge pull request #4914 from jekyll/3.1-jsonify-drops
3.1: Add ability to render drops as JSON
2016-05-19 12:44:47 -07:00
Parker Moore
1cd85b0d94 Fix test to simply ensure next is an object in jsonify 2016-05-19 11:40:58 -07:00
Parker Moore
1e722cfac4 Add ability to render drops as JSON
Previously you could do, e.g. {{ site | jsonify }}, but with the introduction of Liquid Drops, this didn't work anymore.
This PR adds the ability to render drops as JSON. You can safely run drop.to_json and it should Do the Right Thing.
2016-05-19 11:01:09 -07:00
Parker Moore
23be0d58b1 Release 💎 3.1.5 2016-05-18 21:21:02 -07:00
Parker Moore
eefbcf7cf4 Release 💎 v3.1.5 2016-05-18 21:20:57 -07:00
Parker Moore
cafbd83e55 Merge pull request #4912 from jekyll/3.1-sort-includes
Sort the results of the require_all glob.
2016-05-18 21:19:40 -07:00
Parker Moore
b48e6b342c lib/jekyll.rb: require document_drop to ease our pain 2016-05-18 21:11:14 -07:00
Parker Moore
539213ac11 Sort the results of the require_all glob.
Filesystems behave differently when performing glob listings.

In my environment, they are listed alphabetically. On my Mac, when asking for a list of files in a directory, those files are returned as a nicely sorted list. Alphabetized, like you'd want them to be. Like you'd expect them to be.

In some environments, quite different from my own, the return of a similar operation is quite random. Perhaps q comes before a, or e before d; the filesystem will choose its order of the day and you, the fare user, tired and weary from work, must bare the brunt of this.

And so, with this commit, I do hereby request that the noble makers of Dir[] provide for us, the downtrodden and ravaged users, some consistency. As a user of Ruby, I shouldn't have to know or consider the behaviour of an individual filesystem here; it should function the same for all filesystems.

Truly yours,
Parker
2016-05-18 18:54:49 -07:00
Parker Moore
0423633cfb Release 💎 3.1.4 2016-05-18 15:51:59 -07:00
Parker Moore
cc21d9cec9 Release 💎 v3.1.4 2016-05-18 15:51:55 -07:00
Parker Moore
928df67775 Update history to reflect merge of #4909 2016-05-18 15:45:57 -07:00
Parker Moore
21c563c0ff Merge pull request #4909 from jekyll/3.1-fix-layout-var-overflow
3.1: Fix `{{ layout }}` oddities (proper inheritance & fixing overflow of old data)
2016-05-18 15:34:53 -07:00
Parker Moore
c0f0a72f15 Update history to reflect the merge of #4910 2016-05-18 15:30:51 -07:00
Parker Moore
268c4a6cbc Merge pull request #4910 from jekyll/3.1-configuration-from-permalink-fix
3.1: Configuration permalink fix and addition of Configuration.from and sorting `site.collections` by label
2016-05-18 15:20:52 -07:00
Parker Moore
1b32c84e5f Fix tests for plugins in configuration. 2016-05-18 14:49:21 -07:00
Parker Moore
145afae307 Define Drop#each so we can use the new frozen/duping behavior 2016-05-18 12:53:08 -07:00
Parker Moore
8fae81861d Don't default 'include' and 'exclude' to an empty array 2016-05-18 12:49:23 -07:00
Parker Moore
3b6fb90b31 Fix some minor things in the tests 2016-05-18 12:49:06 -07:00
Parker Moore
c416495539 Freeze configuration defaults & duplicate in deep_merge_hashes if need be. 2016-05-18 12:48:42 -07:00
Parker Moore
ebf8be2de1 Remove merge conflicts I forgot to fix. 2016-05-18 11:36:57 -07:00
Parker Moore
cec9e510f2 Add missing 'end' to test/helper.rb 2016-05-18 11:31:22 -07:00
Parker Moore
644a760936 Remove call to #backwards_compatibilize in Configuration.from 2016-05-18 11:18:43 -07:00
Parker Moore
09ef65e49b Site#site_payload: sort collections by label 2016-05-18 11:16:26 -07:00
Parker Moore
4ed03641b7 Configuration#add_default_collections: fix bug where DEFAULTS['collections'] is modified 2016-05-18 10:58:38 -07:00
Parker Moore
0a733d4fbb Add Configuration.from & use in Jekyll.configuration.
This process streamlines the creation of new configurations. Creating a new
site will choke if not all the correct options are given.
Configuration.from will ensure the overrides have all string keys and
ensures all the common issues & defaults are in place so a Site can be
created.

A common use:

    config = Configuration.from({ 'permalink' => '/:title/' }) # etc
    site = Jekyll::Site.new(config)
2016-05-18 10:58:26 -07:00
Parker Moore
040040b980 Remove use of Marshal in runtime code. 2016-05-18 10:56:32 -07:00
Parker Moore
96feb89df0 Add tests for Configuration#add_default_collections 2016-05-18 10:55:43 -07:00
Parker Moore
cc5996afd2 Don't read a config file if the filename is empty. 2016-05-18 10:50:20 -07:00
Parker Moore
bfdf3e0d9b Use Marshal to duplicate configuration defaults to prevent manipulation 2016-05-18 10:50:11 -07:00
Parker Moore
827ec88c99 Refactor some tests to prevent manipulation of Jekyll::Config::DEFAULTS 2016-05-18 10:48:34 -07:00
Parker Moore
7baf560016 Only write collections.posts.permalink if permalink is set. 2016-05-18 10:47:35 -07:00
Parker Moore
aeadbfc6c0 Test#build_configs shouldn't overwrite default collections 2016-05-18 10:43:55 -07:00
Parker Moore
7ed3778756 Update history to reflect the merge of #4907 2016-05-18 10:43:26 -07:00
Parker Moore
be9226b4e8 Reset {{ layout }} between each render & merge layout data properly 2016-05-18 09:58:48 -07:00
Parker Moore
d09684dcb2 Add failing test for layout data inheritance bug (#4433) 2016-05-18 09:58:20 -07:00
Parker Moore
b46f8d0adf Add failing test for layout bug (#4897) 2016-05-18 09:48:09 -07:00
Parker Moore
43ceaf8c28 Update gemfile to specify rubocop version and require env before adding jekyll-docs 2016-05-18 09:43:53 -07:00
Parker Moore
f99ffe5bf1 Merge pull request #4907 from jekyll/3.1-page-excerpt-bug
Add ExcerptDrop and remove excerpt's ability to refer to itself in Liquid
2016-05-18 09:42:29 -07:00
Parker Moore
400a8d7b48 excerpt drop should give access to document's layout 2016-05-17 16:58:26 -07:00
Parker Moore
d6c972a9ba look up the content methods for drops in a smarter way 2016-05-17 16:58:06 -07:00
Parker Moore
aadf43727e travis: just run our builds, darn it 2016-05-17 16:57:33 -07:00
Parker Moore
fe5f9d80df Merge branch '3.1-page-excerpt-bug' of github.com:jekyll/jekyll into 3.1-page-excerpt-bug
* '3.1-page-excerpt-bug' of github.com:jekyll/jekyll:
  Use require_relative
2016-05-17 16:44:05 -07:00
Parker Moore
0dabdfb159 Run builds on this branch. 2016-05-17 16:43:53 -07:00
Parker Moore
e23520c793 Use require_relative 2016-05-17 16:42:35 -07:00
Parker Moore
e19e1629ba Add ExcerptDrop and remove excerpt's ability to refer to itself in Liquid 2016-05-17 14:38:15 -07:00
Parker Moore
6e208e89e6 Release 💎 3.1.3 2016-04-18 14:28:21 -07:00
Parker Moore
b962ed63a4 Allow release from here 2016-04-18 14:28:14 -07:00
Parker Moore
c4e452323e Release v3.1.3 2016-04-18 14:25:09 -07:00
Parker Moore
787f11de71 Merge pull request #4807 from jekyll/3.1-stable-fix-defaults
3.1.x: Fix defaults for Documents (posts/collection docs)
2016-04-18 14:24:37 -07:00
Parker Moore
b64345f0a0 test_document: scopes are based on relative_path 2016-04-18 13:54:16 -07:00
Parker Moore
50637ba0d4 Document#read: frontmatter.all should get relative_path not URL 2016-04-18 13:54:10 -07:00
Florian Thomas
e763d4c4b2 add failing test for scope values in subdirs
ref #4458
2016-04-18 13:54:05 -07:00
Parker Moore
bd2d9a4642 Merge pull request #4693 from jekyll/bug/fix-ssl-opts
Fix #4689: Use SSLEnable instead of EnableSSL and make URL HTTPS.
2016-03-22 16:09:12 -07:00
Jordon Bedwell
2b9e849bbb Fix #4689: Use SSLEnable instead of EnableSSL and make URL HTTPS. 2016-03-21 11:23:26 -05:00
113 changed files with 1047 additions and 1201 deletions

View File

@@ -1,122 +0,0 @@
# Contributing to Jekyll
Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is an open source project, built one contribution at a time by users like you.
## Where to get help or report a problem
* If you have a question about using Jekyll, start a discussion on [Jekyll Talk](https://talk.jekyllrb.com).
* If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository.
* If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new).
* More resources are listed on our [Help page](https://jekyllrb.com/help/).
## Ways to contribute
Whether you're a developer, a designer, or just a Jekyll devotee, there are lots of ways to contribute. Here's a few ideas:
* [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know.
* Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better?
* Read through [the documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved.
* Browse through [the Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing.
* Find [an open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions.
* Help evaluate [open pull requests](https://github.com/jekyll/jekyll/pulls), by testing the changes locally and reviewing what's proposed.
## Submitting a pull request
### Pull requests generally
* The smaller the proposed change, the better. If you'd like to propose two unrelated changes, submit two pull requests.
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
* Pull request are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/).
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.
### Submitting a pull request via github.com
Many small changes can be made entirely through the github.com web interface.
1. Navigate to the file within [`jekyll/jekyll`](https://github.com/jekyll/jekyll) that you'd like to edit.
2. Click the pencil icon in the top right corner to edit the file
3. Make your proposed changes
4. Click "Propose file change"
5. Click "Create pull request"
6. Add a descriptive title and detailed description for your proposed change. The more information the better.
7. Click "Create pull request"
That's it! You'll be automatically subscribed to receive updates as others review your proposed change and provide feedback.
### Submitting a pull request via Git command line
1. Fork the project by clicking "Fork" in the top right corner of [`jekyll/jekyll`](https://github.com/jekyll/jekyll).
2. Clone the repository lcoally `git clone https://github.com/<you-username>/jekyll`.
3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ).
4. Hack away, add tests. Not necessarily in that order.
5. Make sure everything still passes by running `script/cibuild` (see [the tests section](#running-tests-locally) below)
6. Push the branch up ( `git push origin my-awesome-feature` ).
7. Create a pull request by visiting `https://github.com/<your-username>/jekyll` and following the instructions at the top of the screen.
## Proposing updates to the documentation
We want the Jekyll documentation to be the best it can be. We've open-sourced our docs and we welcome any pull requests if you find it lacking.
### How to submit changes
You can find the documentation for jekyllrb.com in the [site](https://github.com/jekyll/jekyll/tree/master/site) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change.
One gotcha, all pull requests should be directed at the `master` branch (the default branch).
### Adding plugins
If you want to add your plugin to the [list of plugins](https://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.
## Code Contributions
Interesting in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid.
### Tests and documentation
Any time you propose a code change, you should also include updates to the documentation and tests within the same pull request.
#### Documentation
If your contribution changes any Jekyll behavior, make sure to update the documentation. Documentation lives in the `site/_docs` folder (spoiler alert: it's a Jekyll site!). If the docs are missing information, please feel free to add it in. Great docs make a great project. Include changes to the documentation within your pull request, and once merged, `jekyllrb.com` will be updated.
#### Tests
* If you're creating a small fix or patch to an existing feature, a simple test is more than enough. You can usually copy/paste from an existing example in the `tests` folder, but if you need you can find out about our tests suites [Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and [RSpec-Mocks](https://github.com/rspec/rspec-mocks).
* If it's a brand new feature, create a new [Cucumber](https://github.com/cucumber/cucumber/) feature, reusing existing steps where appropriate.
### Code contributions generally
* Jekyll follows the [GitHub Ruby Styleguide](https://github.com/styleguide/ruby).
* Don't bump the Gem version in your pull request (if you don't know what that means, you probably didn't).
## Running tests locally
### Test Dependencies
To run the test suite and build the gem you'll need to install Jekyll's dependencies by running the following command:
<pre class="highlight"><code>$ script/bootstrap</code></pre>
Before you make any changes, run the tests and make sure that they pass (to confirm your environment is configured properly):
<pre class="highlight"><code>$ script/cibuild</code></pre>
If you are only updating a file in `test/`, you can use the command:
<pre class="highlight"><code>$ script/test test/blah_test.rb</code></pre>
If you are only updating a `.feature` file, you can use the command:
<pre class="highlight"><code>$ script/cucumber features/blah.feature</code></pre>
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.
## A thank you
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!

View File

@@ -9,6 +9,7 @@ rvm:
- &ruby1 2.3.0
- &ruby2 2.2.4
- &ruby3 2.1.8
- &ruby4 2.0.0-p648
- &jruby jruby-9.0.4.0
- &rhead ruby-head
@@ -22,10 +23,6 @@ env:
- TEST_SUITE=test
- TEST_SUITE=cucumber
branches:
only:
- master
notifications:
irc:
template: "%{repository}#%{build_number} (%{branch}) %{message} %{build_url}"

View File

@@ -1,4 +1,4 @@
# Code of Conduct
# Contributor Code of Conduct
As contributors and maintainers of this project, and in the interest of
fostering an open and welcoming community, we pledge to respect all people who

106
CONTRIBUTING.markdown Normal file
View File

@@ -0,0 +1,106 @@
Contribute
==========
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
following in mind:
* **Use https://talk.jekyllrb.com for non-technical or indirect Jekyll questions that are not bugs.**
* **Contributions will not be accepted without tests or necessary documentation updates.**
* If you're creating a small fix or patch to an existing feature, just a simple
test will do. Please stay in the confines of the current test suite and use
[Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and
[RSpec-Mocks](https://github.com/rspec/rspec-mocks).
* If it's a brand new feature, make sure to create a new
[Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps
where appropriate. Also, whipping up some documentation in your fork's `site`
would be appreciated, and once merged it will be transferred over to the main
`site`, jekyllrb.com.
* If your contribution changes any Jekyll behavior, make sure to update the
documentation. It lives in `site/_docs`. If the docs are missing information,
please feel free to add it in. Great docs make a great project!
* Please follow the [GitHub Ruby Styleguide](https://github.com/styleguide/ruby)
when modifying Ruby code.
* Please do your best to submit **small pull requests**. The easier the proposed
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)
will also speed up review time.
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 setup:
$ script/bootstrap
Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
$ script/cibuild
If you are only updating a file in `test/`, you can use the command:
$ script/test test/blah_test.rb
If you are only updating a `.feature` file, you can use the command:
$ script/cucumber features/blah.feature
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.
Workflow
--------
Here's the most direct way to get your work merged into the project:
* 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.
* Make sure everything still passes by running `script/cibuild`.
* If necessary, rebase your commits into logical chunks, without errors.
* Push the branch up ( `git push origin my_awesome_feature` ).
* Create a pull request against jekyll/jekyll and describe what your change
does and the why you think it should be merged.
Updating Documentation
----------------------
We want the Jekyll documentation to be the best it can be. We've
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](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](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](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
-------
* Please do not bump the gem version in your pull requests.
* Try to keep your patch(es) based from the latest commit on jekyll/jekyll.
The easier it is to apply your work, the less work the maintainers have to do,
which is always a good thing.
* Please don't tag your GitHub issue with [fix], [feature], etc. The maintainers
actively read the issues and will label it once they come across it.
Finally...
----------
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!

12
Gemfile
View File

@@ -1,10 +1,10 @@
source "https://rubygems.org"
gemspec :name => "jekyll"
gem "rake", "~> 11.0"
gem "rake", "~> 10.1"
group :development do
gem "launchy", "~> 2.3"
gem "rubocop", :branch => :master, :github => "bbatsov/rubocop"
gem "rubocop", "~> 0.40"
gem "pry"
unless RUBY_ENGINE == "jruby"
@@ -55,7 +55,7 @@ end
group :jekyll_optional_dependencies do
gem "toml", "~> 0.1.0"
gem "coderay", "~> 1.1.0"
gem "jekyll-docs", :path => '../docs' if Dir.exist?('../docs') && ENV['JEKYLL_VERSION']
gem "jekyll-docs", path: '../docs' if Dir.exist?('../docs') && ENV["JEKYLL_VERSION"]
gem "jekyll-gist", "~> 1.0"
gem "jekyll-feed", "~> 0.1.3"
gem "jekyll-coffeescript", "~> 1.0"
@@ -80,9 +80,5 @@ group :site do
if ENV["PROOF"]
gem "html-proofer", "~> 2.0"
end
gem "jemoji", "0.5.1"
gem "jekyll-sitemap"
gem "jekyll-seo-tag", "~> 1.1"
gem "jekyll-avatar"
gem "jemoji"
end

View File

@@ -1,70 +1,25 @@
## HEAD
### Minor Enhancements
* Stop testing with Ruby 2.0.x, which is EOL'd. (#4381)
* Allow collections to have documents that have no file extension (#4545)
* Add size property to group_by result (#4557)
* Site Template: Removed unnecessary nesting from `_base.scss` (#4637)
* Adding a debug log statment for skipped future documents. (#4558)
* Site Template: Changed main `<div>` to `<main>` and added accessibility info (#4636)
* Add array support to `where` filter (#4555)
* 'jekyll clean': also remove .sass-cache (#4652)
* Clean up Tags::PostUrl a bit, including better errors and date parsing (#4670)
* Use String#encode for xml_escape filter instead of CGI.escapeHTML (#4694)
* Add show_dir_listing option for serve command and fix index file names (#4533)
* Site Template: write a Gemfile which is educational to the new site (#4542)
* Site template: add explanation of site variables in the example `_config.yml` (#4704)
* Adds `link` Liquid tag to make generation of URL's easier (#4624)
* Allow static files to be symlinked in unsafe mode or non-prod environments (#4640)
* Add `:after_init` hook & add `Site#config=` to make resetting config easy (#4703)
* DocumentDrop: add `#<=>` which sorts by date (falling back to path) (#4741)
## 3.1.6 / 2016-05-19
### Bug Fixes
* Site Template: Added a default lang attribute (#4633)
* Site template: Escape title and description where it is used in HTML (#4606)
* Document#date: drafts which have no date should use source file mtime (#4611)
* Filters#time: clone an input Time so as to be non-destructive (#4590)
* Doctor: fix issue where `--config` wasn't a recognized flag (#4598)
* Ensures related_posts are only set for a post (#4620)
* EntryFilter#special?: ignore filenames which begin with '~' (#4491)
* Cleaner: `keep_files` should only apply to the beginning of paths, not substrings with index > 0 (#3849)
* Add ability to `jsonify` Drops such that, e.g. `site | jsonify`, works. (#4914)
### Development Fixes
## 3.1.5 / 2016-05-18
* Add project maintainer profile links (#4591)
* Fix state leakage in Kramdown test (#4618)
* Unify method for copying special files from repo to site (#4601)
* Refresh the contributing file (#4596)
* change smartify doc from copy/paste of mardownify doc (#4653)
* Update Rake & disable warnings when running tests (#4720)
* Fix many warnings (#4537)
* Don't blindly assume the last system when determining "open" cmd (#4717)
### Bug Fixes
### Site Enhancements
* Sort the results of the `require_all` glob (affects Linux only). (#4912)
* Add jekyll-seo-tag, jekyll-avatar, and jekyll-sitemap to the site (#4553)
* Add Google search query to /docs/help/ (#4589)
* Upgrading, documentation (#4597)
* Add 'view source' entry (#4602)
* Add jekyll-video-embed to list of third-party plugins. (#4621)
* Adding Aerobatic to list of deployment options (#4630)
* Update documentation: HTMLProofer CLI command (#4641)
* Document that subdirectories of `_posts` are no longer categories (#4639)
* Update continuous-integration docs with sudo: false information (#4628)
* Blog post on refreshed contributing file and new affinity teams (#4645)
* Fixes typo on collections (#4647)
* Documentation: future option also works for collections (#4682)
* Additional package needed for Fedora 23 Workspace (#4685)
* Fix typo on Chocolatey name in Windows documentation (#4686)
* Use the correct URL, Fixes #4698 (#4699)
* Add jekyll-paspagon plugin (#4700)
* Bold-italicize note in assets documentation about needing yaml front matter (#4706)
* Highlight the `script/` calls in the Contributing documentation (#4712)
* Add Hawkins to the list of third-party plugins (#4755)
* Fix a typo in pagination doc (#4763)
* Switch second GitHub Pages link to HTTPS (#4760)
## 3.1.4 / 2016-05-18
### Bug Fixes
* Add `ExcerptDrop` and remove excerpt's ability to refer to itself in Liquid (#4907)
* Configuration permalink fix where `collections.posts.permalink` inherits properly from `permalink` only when it doesn't exist (#4910)
* Add `Configuration.from` to make it easier to build configs from just a hash
* Sorting `site.collections` in Liquid by label (#4910)
* Fix bug where `layout` in Liquid would inherit from previously-rendered layouts' metadatas (#4909)
* Fix bug where `layout` in Liquid would override in the wrong direction (more-specific layouts' data were overwritten by their parent layouts' data; this has now been reversed) (#4909)
## 3.1.2 / 2016-02-19
@@ -1027,7 +982,7 @@
* Patch a couple show-stopping security vulnerabilities (#1946)
* Sanitize paths uniformly, in a Windows-friendly way (#2065, #2109)
* Update gem build steps to work correctly on Windows (#2118)
* Remove obsolete `normalize_options` method call from `bin/jekyll` (#2121)
* Remove obsolete `normalize_options` method call from `bin/jekyll` (#2121).
* Remove `+` characters from Pygments lexer names when adding as a CSS class (#994)
* Remove some code that caused Ruby interpreter warnings (#2178)
* Only strip the drive name if it begins the string (#2175)
@@ -1893,7 +1848,7 @@
* Bug Fixes
* Fix pagination % 0 bug (#78)
* Ensure all posts are processed first (#71)
* Ensure all posts are processed first (#71) ## NOTE
* After this point I will no longer be giving credit in the history; that is what the commit log is for.
## 0.5.4 / 2009-08-23

View File

@@ -1,4 +1,4 @@
# [Jekyll](https://jekyllrb.com/)
# [Jekyll](http://jekyllrb.com/)
[![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
[![Build Status](https://travis-ci.org/jekyll/jekyll.svg?branch=master)][travis]
@@ -14,7 +14,7 @@
[hakiri]: https://hakiri.io/github/jekyll/jekyll/master
[travis]: https://travis-ci.org/jekyll/jekyll
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](https://pages.github.com), which you can use to host sites right from your GitHub repositories.
Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](http://pages.github.com), which you can use to host sites right from your GitHub repositories.
## Philosophy
@@ -22,14 +22,14 @@ Jekyll does what you tell it to do — no more, no less. It doesn't try to outs
## Having trouble with OS X El Capitan?
See: https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
See: http://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
## Getting Started
* [Install](https://jekyllrb.com/docs/installation/) the gem
* Read up about its [Usage](https://jekyllrb.com/docs/usage/) and [Configuration](https://jekyllrb.com/docs/configuration/)
* [Install](http://jekyllrb.com/docs/installation/) the gem
* Read up about its [Usage](http://jekyllrb.com/docs/usage/) and [Configuration](http://jekyllrb.com/docs/configuration/)
* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
* [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
* Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
* Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
## Code of Conduct
@@ -41,18 +41,18 @@ conduct.
Please adhere to this code of conduct in any interactions you have in the
Jekyll community. It is strictly enforced on all official Jekyll
repositories, websites, and resources. If you encounter someone violating
these terms, please let a maintainer ([@parkr](https://github.com/parkr), [@envygeeks](https://github.com/envygeeks), or [@mattr-](https://github.com/mattr-)) know
these terms, please let a maintainer (@parkr, @envygeeks, or @mattr-) know
and we will address it as soon as possible.
## Diving In
* [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
* Learn how the [YAML Front Matter](https://jekyllrb.com/docs/frontmatter/) works
* Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
* Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
* Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
* Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
* Learn how the [YAML Front Matter](http://jekyllrb.com/docs/frontmatter/) works
* Put information on your site with [Variables](http://jekyllrb.com/docs/variables/)
* Customize the [Permalinks](http://jekyllrb.com/docs/permalinks/) your posts are generated with
* Use the built-in [Liquid Extensions](http://jekyllrb.com/docs/templates/) to make your life easier
* Use custom [Plugins](http://jekyllrb.com/docs/plugins/) to generate content specific to your site
## License
See the [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE) file.
See [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE).

View File

@@ -87,34 +87,6 @@ def converted_history(markdown)
normalize_bullets(markdown)))))
end
def siteify_file(file, overrides_front_matter = {})
abort "You seem to have misplaced your #{file} file. I can haz?" unless File.exists?(file)
title = begin
File.read(file).match(/\A# (.*)$/)[1]
rescue
File.basename(file, ".*").downcase.capitalize
end
slug = File.basename(file, ".markdown").downcase
front_matter = {
"title" => title,
"layout" => "docs",
"permalink" => "/docs/#{slug}/",
"note" => "This file is autogenerated. Edit /#{file} instead."
}.merge(overrides_front_matter)
contents = "#{front_matter.to_yaml}---\n\n#{content_for(file)}"
File.write("site/_docs/#{slug}.md", contents)
end
def content_for(file)
contents = File.read(file)
case file
when "History.markdown"
converted_history(contents)
else
contents.gsub(/\A# .*\n\n?/, "")
end
end
#############################################################################
#
# Standard tasks

View File

@@ -1,51 +0,0 @@
#!/usr/bin/env ruby
require 'benchmark/ips'
# For this pull request, which changes Page#dir
# https://github.com/jekyll/jekyll/pull/4403
CONTENT_CONTAINING = <<-HTML.freeze
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>Jemoji</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="/css/screen.css">
</head>
<body class="wrap">
<p><img class="emoji" title=":+1:" alt=":+1:" src="https://assets.github.com/images/icons/emoji/unicode/1f44d.png" height="20" width="20" align="absmiddle"></p>
</body>
</html>
HTML
CONTENT_NOT_CONTAINING = <<-HTML.freeze
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>Jemoji</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="/css/screen.css">
</head>
<body class="wrap">
<p><img class="emoji" title=":+1:" alt=":+1:" src="https://assets.github.com/images/icons/emoji/unicode/1f44d.png" height="20" width="20" align="absmiddle"></p>
</body>
</html>
HTML
Benchmark.ips do |x|
x.report("no body include?") { CONTENT_NOT_CONTAINING.include?('<body') }
x.report("no body regexp") { CONTENT_NOT_CONTAINING =~ /<\s*body/ }
x.compare!
end
# No trailing slash
Benchmark.ips do |x|
x.report("with body include?") { CONTENT_CONTAINING.include?('<body') }
x.report("with body regexp") { CONTENT_CONTAINING =~ /<\s*body/ }
x.compare!
end

View File

@@ -10,6 +10,7 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Collections: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>\n<p>Signs are nice</p>\n<p><code class=\"highlighter-rouge\">Jekyll.sanitized_path</code> is used to make sure your path is in your source.</p>\n<p>Run your generators! default</p>\n<p>Page without title.</p>\n<p>Run your generators! default</p>" in "_site/index.html"
And the "_site/methods/configuration.html" file should not exist
Scenario: Rendered collection
@@ -76,8 +77,8 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
And the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Collections specified as an hash
Given I have an "index.html" page that contains "Collections: {% for method in site.methods %}{{ method.relative_path }} {% endfor %}"
@@ -89,8 +90,8 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
And the _site directory should exist
And I should see "Collections: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: All the documents
Given I have an "index.html" page that contains "All documents: {% for doc in site.documents %}{{ doc.relative_path }} {% endfor %}"
@@ -102,11 +103,11 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "All documents: _methods/collection/entries _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
And the _site directory should exist
And I should see "All documents: _methods/configuration.md _methods/escape-\+ #%20\[\].md _methods/sanitized_path.md _methods/site/generate.md _methods/site/initialize.md _methods/um_hi.md" in "_site/index.html"
Scenario: Documents have an output attribute, which is the converted HTML
Given I have an "index.html" page that contains "Second document's output: {{ site.documents[1].output }}"
Given I have an "index.html" page that contains "First document's output: {{ site.documents.first.output }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
@@ -115,8 +116,8 @@ Feature: Collections
"""
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Second document's output: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
And the _site directory should exist
And I should see "First document's output: <p>Use <code class=\"highlighter-rouge\">Jekyll.configuration</code> to build a full configuration for use w/Jekyll.</p>\n\n<p>Whatever: foo.bar</p>" in "_site/index.html"
Scenario: Filter documents by where
Given I have an "index.html" page that contains "{% assign items = site.methods | where: 'whatever','foo.bar' %}Item count: {{ items.size }}"
@@ -132,7 +133,7 @@ Feature: Collections
And I should see "Item count: 2" in "_site/index.html"
Scenario: Sort by title
Given I have an "index.html" page that contains "{% assign items = site.methods | sort: 'title' %}2. of {{ items.size }}: {{ items[1].output }}"
Given I have an "index.html" page that contains "{% assign items = site.methods | sort: 'title' %}1. of {{ items.size }}: {{ items.first.output }}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
@@ -142,10 +143,10 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "2. of 8: <p>Page without title.</p>" in "_site/index.html"
And I should see "1. of 7: <p>Page without title.</p>" in "_site/index.html"
Scenario: Sort by relative_path
Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{{ methods | map:"title" | join: ", " }}"
Given I have an "index.html" page that contains "Collections: {% assign methods = site.methods | sort: 'relative_path' %}{% for method in methods %}{{ method.title }}, {% endfor %}"
And I have fixture collections
And I have a "_config.yml" file with content:
"""
@@ -155,7 +156,7 @@ Feature: Collections
When I run jekyll build
Then I should get a zero exit status
Then the _site directory should exist
And I should see "Collections: Collection#entries, Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Site#generate," in "_site/index.html"
And I should see "Collections: Jekyll.configuration, Jekyll.escape, Jekyll.sanitized_path, Site#generate, Initialize, Site#generate, YAML with Dots," in "_site/index.html"
Scenario: Rendered collection with date/dateless filename
Given I have an "index.html" page that contains "Collections: {% for method in site.thanksgiving %}{{ method.title }} {% endfor %}"

View File

@@ -186,20 +186,3 @@ Feature: Create sites
Then I should get a zero exit status
And the _site directory should exist
And the "_site/2020/12/31/entry1.html" file should exist
Scenario: Basic site with layouts, posts and related posts
Given I have a _layouts directory
And I have a page layout that contains "Page {{ page.title }}: {{ content }}"
And I have a post layout that contains "Post {{ page.title }}: {{ content }}Related posts: {{ site.related_posts | size }}"
And I have an "index.html" page with layout "page" that contains "Site contains {{ site.pages.size }} pages and {{ site.posts.size }} posts; Related posts: {{ site.related_posts | size }}"
And I have a _posts directory
And I have the following posts:
| title | date | layout | content |
| entry1 | 2009-03-27 | post | content for entry1. |
| entry2 | 2009-04-27 | post | content for entry2. |
When I run jekyll build
Then I should get a zero exit status
And the _site directory should exist
And I should see "Page : Site contains 1 pages and 2 posts; Related posts: 0" in "_site/index.html"
And I should see "Post entry1: <p>content for entry1.</p>\nRelated posts: 1" in "_site/2009/03/27/entry1.html"
And I should see "Post entry2: <p>content for entry2.</p>\nRelated posts: 1" in "_site/2009/04/27/entry2.html"

View File

@@ -80,6 +80,26 @@ Feature: frontmatter defaults
And I should see "main: <p>content of site/special/2013/10/14/about1.html</p>" in "_site/special/2013/10/14/about1.html"
And I should see "main: <p>content of site/special/2013/10/14/about2.html</p>" in "_site/special/2013/10/14/about2.html"
Scenario: Use frontmatter scopes for subdirectories
Given I have a _layouts directory
And I have a main layout that contains "main: {{ content }}"
And I have a _posts/en directory
And I have the following post under "en":
| title | date | content |
| helloworld | 2014-09-01 | {{page.lang}} is the current language |
And I have a _posts/de directory
And I have the following post under "de":
| title | date | content |
| hallowelt | 2014-09-01 | {{page.lang}} is the current language |
And I have a configuration file with "defaults" set to "[{scope: {path: "_posts/en"}, values: {layout: "main", lang: "en"}}, {scope: {path: "_posts/de"}, values: {layout: "main", lang: "de"}}]"
When I run jekyll build
Then the _site directory should exist
And I should see "main: <p>en is the current language</p>" in "_site/2014/09/01/helloworld.html"
And I should see "main: <p>de is the current language</p>" in "_site/2014/09/01/hallowelt.html"
Scenario: Override frontmatter defaults by type
Given I have a _posts directory
And I have the following post:

View File

@@ -35,3 +35,36 @@ Feature: Layout data
When I run jekyll build
Then the "_site/index.html" file should exist
And I should see "page content\n foo: my custom data" in "_site/index.html"
Scenario: Inherit custom layout data and clear when not present
Given I have a _layouts directory
And I have a "_layouts/default.html" file with content:
"""
---
bar: i'm default
---
{{ content }} foo: '{{ layout.foo }}' bar: '{{ layout.bar }}'
"""
And I have a "_layouts/special.html" file with content:
"""
---
layout: default
foo: my special data
bar: im special
---
{{ content }}
"""
And I have a "_layouts/page.html" file with content:
"""
---
layout: default
bar: im page
---
{{ content }}
"""
And I have an "index.html" page with layout "special" that contains "page content"
And I have an "jekyll.html" page with layout "page" that contains "page content"
When I run jekyll build
Then the "_site/index.html" file should exist
And I should see "page content\n foo: 'my special data' bar: 'im special'" in "_site/index.html"
And I should see "page content\n foo: '' bar: 'im page'" in "_site/jekyll.html"

View File

@@ -7,7 +7,7 @@ $LOAD_PATH.unshift File.dirname(__FILE__) # For use/testing when no gem is insta
# Returns nothing.
def require_all(path)
glob = File.join(File.dirname(__FILE__), path, '*.rb')
Dir[glob].each do |f|
Dir[glob].sort.each do |f|
require f
end
end
@@ -95,18 +95,16 @@ module Jekyll
# list of option names and their defaults.
#
# Returns the final configuration Hash.
def configuration(override = {})
config = Configuration[Configuration::DEFAULTS]
override = Configuration[override].stringify_keys
def configuration(override = Hash.new)
config = Configuration.new
unless override.delete('skip_config_files')
config = config.read_config_files(config.config_files(override))
end
# Merge DEFAULTS < _config.yml < override
config = Utils.deep_merge_hashes(config, override).stringify_keys
set_timezone(config['timezone']) if config['timezone']
config
Configuration.from(Utils.deep_merge_hashes(config, override)).tap do |config|
set_timezone(config['timezone']) if config['timezone']
end
end
# Public: Set the TZ environment variable to use the timezone specified
@@ -170,6 +168,7 @@ module Jekyll
end
require "jekyll/drops/drop"
require "jekyll/drops/document_drop"
require_all 'jekyll/commands'
require_all 'jekyll/converters'
require_all 'jekyll/converters/markdown'

View File

@@ -95,12 +95,11 @@ module Jekyll
# Private: Creates a regular expression from the config's keep_files array
#
# Examples
# ['.git','.svn'] with site.dest "/myblog/_site" creates
# the following regex: /\A\/myblog\/_site\/(\.git|\/.svn)/
# ['.git','.svn'] creates the following regex: /\/(\.git|\/.svn)/
#
# Returns the regular expression
def keep_file_regex
/\A#{Regexp.quote(site.dest)}\/(#{Regexp.union(site.keep_files).source})/
Regexp.union(site.keep_files)
end
end
end

View File

@@ -78,7 +78,7 @@ module Jekyll
def entries
return [] unless exists?
@entries ||=
Utils.safe_glob(collection_dir, ["**", "*"]).map do |entry|
Utils.safe_glob(collection_dir, ["**", "*.*"]).map do |entry|
entry["#{collection_dir}/"] = ''
entry
end

View File

@@ -19,19 +19,21 @@ module Jekyll
options = configuration_from_options(options)
destination = options['destination']
metadata_file = File.join(options['source'], '.jekyll-metadata')
sass_cache = File.join(options['source'], '.sass-cache')
remove(destination, checker_func: :directory?)
remove(metadata_file, checker_func: :file?)
remove(sass_cache, checker_func: :directory?)
end
def remove(filename, checker_func: :file?)
if File.public_send(checker_func, filename)
Jekyll.logger.info "Cleaner:", "Removing #{filename}..."
FileUtils.rm_rf(filename)
if File.directory? destination
Jekyll.logger.info "Cleaning #{destination}..."
FileUtils.rm_rf(destination)
Jekyll.logger.info "", "done."
else
Jekyll.logger.info "Cleaner:", "Nothing to do for #{filename}."
Jekyll.logger.info "Nothing to do for #{destination}."
end
if File.file? metadata_file
Jekyll.logger.info "Removing #{metadata_file}..."
FileUtils.rm_rf(metadata_file)
Jekyll.logger.info "", "done."
else
Jekyll.logger.info "Nothing to do for #{metadata_file}."
end
end
end

View File

@@ -8,7 +8,7 @@ module Jekyll
c.description 'Search site and print specific deprecation warnings'
c.alias(:hyde)
c.option 'config', '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
c.action do |_, options|
Jekyll::Commands::Doctor.process(options)

View File

@@ -35,10 +35,6 @@ module Jekyll
File.open(File.expand_path(initialized_post_name, new_blog_path), "w") do |f|
f.write(scaffold_post_content)
end
File.open(File.expand_path("Gemfile", new_blog_path), "w") do |f|
f.write(gemfile_contents)
end
end
Jekyll.logger.info "New jekyll site installed in #{new_blog_path}."
@@ -63,31 +59,6 @@ module Jekyll
end
private
def gemfile_contents
<<-RUBY
source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "#{Jekyll::VERSION}"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
# group :jekyll_plugins do
# gem "jekyll-github-metadata", "~> 1.0"
# end
RUBY
end
def preserve_source_location?(path, options)
!options["force"] && !Dir["#{path}/**/*"].empty?

View File

@@ -10,8 +10,6 @@ module Jekyll
"ssl_key" => ["--ssl-key [KEY]", "X.509 (SSL) Private Key."],
"port" => ["-P", "--port [PORT]", "Port to listen on"],
"baseurl" => ["-b", "--baseurl [URL]", "Base URL"],
"show_dir_listing" => ["--show-dir-listing",
"Show a directory listing instead of loading your index file."],
"skip_initial_build" => ["skip_initial_build", "--skip-initial-build",
"Skips the initial site build which occurs before the server is started."]
}
@@ -93,8 +91,6 @@ module Jekyll
)
}
opts[:DirectoryIndex] = [] if opts[:JekyllOptions]['show_dir_listing']
enable_ssl(opts)
enable_logging(opts)
opts
@@ -116,23 +112,27 @@ module Jekyll
private
def server_address(server, opts)
address = server.config[:BindAddress]
baseurl = "#{opts["baseurl"]}/" if opts["baseurl"]
port = server.config[:Port]
"http://#{address}:#{port}#{baseurl}"
"%{prefix}://%{address}:%{port}%{baseurl}" % {
:prefix => server.config[:SSLEnable] ? "https" : "http",
:baseurl => opts["baseurl"] ? "#{opts["baseurl"]}/" : "",
:address => server.config[:BindAddress],
:port => server.config[:Port]
}
end
#
private
def launch_browser(server, opts)
address = server_address(server, opts)
return system "start", address if Utils::Platforms.windows?
return system "xdg-open", address if Utils::Platforms.linux?
return system "open", address if Utils::Platforms.osx?
Jekyll.logger.error "Refusing to launch browser; " \
"Platform launcher unknown."
command =
if Utils::Platforms.windows?
"start"
elsif Utils::Platforms.osx?
"open"
else
"xdg-open"
end
system command, server_address(server, opts)
end
# Keep in our area with a thread or detach the server as requested
@@ -182,7 +182,7 @@ module Jekyll
source_certificate = Jekyll.sanitized_path(opts[:JekyllOptions]["source"], opts[:JekyllOptions]["ssl_cert"])
opts[:SSLCertificate] = OpenSSL::X509::Certificate.new(File.read(source_certificate))
opts[:SSLPrivateKey ] = OpenSSL::PKey::RSA.new(File.read(source_key))
opts[:EnableSSL] = true
opts[:SSLEnable] = true
end
private

View File

@@ -44,7 +44,6 @@ module Jekyll
'port' => '4000',
'host' => '127.0.0.1',
'baseurl' => '',
'show_dir_listing' => false,
# Output Configuration
'permalink' => 'date',
@@ -72,7 +71,24 @@ module Jekyll
'hard_wrap' => false,
'footnote_nr' => 1
}
}]
}.map { |k, v| [k, v.freeze] }].freeze
class << self
# Static: Produce a Configuration ready for use in a Site.
# It takes the input, fills in the defaults where values do not
# exist, and patches common issues including migrating options for
# backwards compatiblity. Except where a key or value is being fixed,
# the user configuration will override the defaults.
#
# user_config - a Hash or Configuration of overrides.
#
# Returns a Configuration filled with defaults and fixed for common
# problems and backwards-compatibility.
def from(user_config)
Utils.deep_merge_hashes(DEFAULTS, Configuration[user_config].stringify_keys).
fix_common_issues.add_default_collections
end
end
# Public: Turn all keys into string
#
@@ -149,7 +165,7 @@ module Jekyll
Jekyll.logger.info "Configuration file:", file
next_config
rescue SystemCallError
if @default_config_file ||= nil
if @default_config_file
Jekyll.logger.warn "Configuration file:", "none"
{}
else
@@ -169,6 +185,7 @@ module Jekyll
begin
files.each do |config_file|
next if config_file.nil? or config_file.empty?
new_config = read_config_file(config_file)
configuration = Utils.deep_merge_hashes(configuration, new_config)
end
@@ -228,7 +245,6 @@ module Jekyll
end
%w(include exclude).each do |option|
config[option] ||= []
if config[option].is_a?(String)
Jekyll::Deprecator.deprecation_message "The '#{option}' configuration option" \
" must now be specified as an array, but you specified" \
@@ -236,7 +252,7 @@ module Jekyll
" as a list of comma-separated values."
config[option] = csv_to_array(config[option])
end
config[option].map!(&:to_s)
config[option].map!(&:to_s) if config[option]
end
if (config['kramdown'] || {}).key?('use_coderay')
@@ -271,14 +287,22 @@ module Jekyll
def add_default_collections
config = clone
# It defaults to `{}`, so this is only if someone sets it to null manually.
return config if config['collections'].nil?
# Ensure we have a hash.
if config['collections'].is_a?(Array)
config['collections'] = Hash[config['collections'].map { |c| [c, {}] }]
end
config['collections']['posts'] ||= {}
config['collections']['posts']['output'] = true
config['collections']['posts']['permalink'] = style_to_permalink(config['permalink'])
config['collections'] = Utils.deep_merge_hashes(
{ 'posts' => {} }, config['collections']
).tap do |collections|
collections['posts']['output'] = true
if config['permalink']
collections['posts']['permalink'] ||= style_to_permalink(config['permalink'])
end
end
config
end

View File

@@ -8,9 +8,7 @@ module Jekyll
#
# Returns the String prefix.
def self.highlighter_prefix(highlighter_prefix = nil)
if !defined?(@highlighter_prefix) || !highlighter_prefix.nil?
@highlighter_prefix = highlighter_prefix
end
@highlighter_prefix = highlighter_prefix if highlighter_prefix
@highlighter_prefix
end
@@ -22,9 +20,7 @@ module Jekyll
#
# Returns the String suffix.
def self.highlighter_suffix(highlighter_suffix = nil)
if !defined?(@highlighter_suffix) || !highlighter_suffix.nil?
@highlighter_suffix = highlighter_suffix
end
@highlighter_suffix = highlighter_suffix if highlighter_suffix
@highlighter_suffix
end

View File

@@ -6,7 +6,7 @@ module Jekyll
safe true
def setup
return if @setup ||= false
return if @setup
unless (@parser = get_processor)
Jekyll.logger.error "Invalid Markdown processor given:", @config["markdown"]
Jekyll.logger.info "", "Custom processors are not loaded in safe mode" if @config["safe"]

View File

@@ -18,7 +18,6 @@ module Jekyll
Jekyll::External.require_with_graceful_fail "kramdown"
@main_fallback_highlighter = config["highlighter"] || "rouge"
@config = config["kramdown"] || {}
@highlighter = nil
setup
end

View File

@@ -209,10 +209,13 @@ module Jekyll
used = Set.new([layout])
# Reset the payload layout data to ensure it starts fresh for each page.
payload["layout"] = nil
while layout
Jekyll.logger.debug "Rendering Layout:", path
payload["content"] = output
payload["layout"] = Utils.deep_merge_hashes(payload["layout"] || {}, layout.data)
payload["layout"] = Utils.deep_merge_hashes(layout.data, payload["layout"] || {})
self.output = render_liquid(layout.content,
payload,

View File

@@ -68,11 +68,7 @@ module Jekyll
end
def date
data['date'] ||= (draft? ? source_file_mtime : site.time)
end
def source_file_mtime
@source_file_mtime ||= File.mtime(path)
data['date'] ||= site.time
end
# Returns whether the document is a draft. This is only the case if
@@ -263,7 +259,7 @@ module Jekyll
@data = SafeYAML.load_file(path)
else
begin
defaults = @site.frontmatter_defaults.all(url, collection.label.to_sym)
defaults = @site.frontmatter_defaults.all(relative_path, collection.label.to_sym)
merge_data!(defaults, source: "front matter defaults") unless defaults.empty?
self.content = File.read(path, Utils.merged_file_read_opts(site, opts))

View File

@@ -5,10 +5,12 @@ module Jekyll
class DocumentDrop < Drop
extend Forwardable
NESTED_OBJECT_FIELD_BLACKLIST = %w{
content output excerpt next previous
}.freeze
mutable false
def_delegator :@obj, :next_doc, :next
def_delegator :@obj, :previous_doc, :previous
def_delegator :@obj, :relative_path, :path
def_delegators :@obj, :id, :output, :content, :to_s, :relative_path, :url
@@ -20,11 +22,35 @@ module Jekyll
fallback_data['excerpt'].to_s
end
def <=>(other)
return nil unless other.is_a? DocumentDrop
cmp = self['date'] <=> other['date']
cmp = self['path'] <=> other['path'] if cmp.nil? || cmp == 0
cmp
def previous
@obj.previous_doc.to_liquid
end
def next
@obj.next_doc.to_liquid
end
# Generate a Hash for use in generating JSON.
# This is useful if fields need to be cleared before the JSON can generate.
#
# Returns a Hash ready for JSON generation.
def hash_for_json(state = nil)
to_h.tap do |hash|
if state && state.depth >= 2
hash["previous"] = collapse_document(hash["previous"]) if hash["previous"]
hash["next"] = collapse_document(hash["next"]) if hash["next"]
end
end
end
# Generate a Hash which breaks the recursive chain.
# Certain fields which are normally available are omitted.
#
# Returns a Hash with only non-recursive fields present.
def collapse_document(doc)
doc.keys.each_with_object({}) do |(key, _), result|
result[key] = doc[key] unless NESTED_OBJECT_FIELD_BLACKLIST.include?(key)
end
end
private

View File

@@ -3,7 +3,9 @@
module Jekyll
module Drops
class Drop < Liquid::Drop
NON_CONTENT_METHODS = [:[], :[]=, :inspect, :to_h, :fallback_data].freeze
include Enumerable
NON_CONTENT_METHODS = [:fallback_data, :collapse_document].freeze
# Get or set whether the drop class is mutable.
# Mutability determines whether or not pre-defined fields may be
@@ -86,7 +88,7 @@ module Jekyll
# Returns an Array of strings which represent method-specific keys.
def content_methods
@content_methods ||= (
self.class.instance_methods(false) - NON_CONTENT_METHODS
self.class.instance_methods - Jekyll::Drops::Drop.instance_methods - NON_CONTENT_METHODS
).map(&:to_s).reject do |method|
method.end_with?("=")
end
@@ -138,6 +140,22 @@ module Jekyll
JSON.pretty_generate to_h
end
# Generate a Hash for use in generating JSON.
# This is useful if fields need to be cleared before the JSON can generate.
#
# Returns a Hash ready for JSON generation.
def hash_for_json(state = nil)
to_h
end
# Generate a JSON representation of the Drop.
#
# Returns a JSON representation of the Drop in a String.
def to_json(state = nil)
require 'json'
JSON.generate(hash_for_json(state), state)
end
# Collects all the keys and passes each to the block in turn.
#
# block - a block which accepts one argument, the key
@@ -147,6 +165,12 @@ module Jekyll
keys.each(&block)
end
def each(&block)
each_key.each do |key|
yield key, self[key]
end
end
def merge(other, &block)
self.dup.tap do |me|
if block.nil?

View File

@@ -0,0 +1,15 @@
# encoding: UTF-8
module Jekyll
module Drops
class ExcerptDrop < DocumentDrop
def layout
@obj.doc.data['layout']
end
def excerpt
nil
end
end
end
end

View File

@@ -16,6 +16,18 @@ module Jekyll
def environment
Jekyll.env
end
def to_h
@to_h ||= {
"version" => version,
"environment" => environment
}
end
def to_json(state = nil)
require 'json'
JSON.generate(to_h, state)
end
end
end
end

View File

@@ -28,7 +28,7 @@ module Jekyll
end
def collections
@site_collections ||= @obj.collections.values.map(&:to_liquid)
@site_collections ||= @obj.collections.values.sort_by(&:label).map(&:to_liquid)
end
private

View File

@@ -1,6 +1,6 @@
module Jekyll
class EntryFilter
SPECIAL_LEADING_CHARACTERS = ['.', '_', '#', '~'].freeze
SPECIAL_LEADING_CHARACTERS = ['.', '_', '#'].freeze
attr_reader :site

View File

@@ -6,9 +6,5 @@ module Jekyll
InvalidPermalinkError = Class.new(FatalException)
InvalidYAMLFrontMatterError = Class.new(FatalException)
MissingDependencyException = Class.new(FatalException)
InvalidDateError = Class.new(FatalException)
InvalidPostNameError = Class.new(FatalException)
PostURLError = Class.new(FatalException)
end
end

View File

@@ -7,7 +7,7 @@ module Jekyll
attr_writer :output
def_delegators :@doc, :site, :name, :ext, :relative_path, :extname,
:render_with_liquid?, :collection, :related_posts
:render_with_liquid?, :collection, :related_posts, :url
# Initialize this Excerpt instance.
#
@@ -59,10 +59,7 @@ module Jekyll
end
def to_liquid
doc.data['excerpt'] = nil
@to_liquid ||= doc.to_liquid
doc.data['excerpt'] = self
@to_liquid
Jekyll::Drops::ExcerptDrop.new(self)
end
# Returns the shorthand String identifier of this doc.

View File

@@ -15,11 +15,11 @@ module Jekyll
converter.convert(input)
end
# Convert quotes into smart quotes.
# Convert a Markdown string into HTML output.
#
# input - The String to convert.
# input - The Markdown String to convert.
#
# Returns the smart-quotified String.
# Returns the HTML formatted String.
def smartify(input)
site = @context.registers[:site]
converter = site.find_converter_instance(Jekyll::Converters::SmartyPants)
@@ -117,7 +117,7 @@ module Jekyll
#
# Returns the escaped String.
def xml_escape(input)
input.to_s.encode(:xml => :attr).gsub(/\A"|"\Z/, "")
CGI.escapeHTML(input.to_s)
end
# CGI escape a string for use in a URL. Replaces any special characters
@@ -205,7 +205,7 @@ module Jekyll
input.group_by do |item|
item_property(item, property).to_s
end.inject([]) do |memo, i|
memo << { "name" => i.first, "items" => i.last, "size" => i.last.size }
memo << { "name" => i.first, "items" => i.last }
end
else
input
@@ -222,7 +222,7 @@ module Jekyll
def where(input, property, value)
return input unless input.is_a?(Enumerable)
input = input.values if input.is_a?(Hash)
input.select { |object| Array(item_property(object, property)).map(&:to_s).include?(value.to_s) }
input.select { |object| item_property(object, property).to_s == value.to_s }
end
# Sort an array of objects
@@ -308,14 +308,14 @@ module Jekyll
#
# Returns a String representation of the object.
def inspect(input)
xml_escape(input.inspect)
CGI.escapeHTML(input.inspect)
end
private
def time(input)
case input
when Time
input.clone
input
when Date
input.to_time
when String

View File

@@ -94,8 +94,8 @@ module Jekyll
return true if !scope.key?('path') || scope['path'].empty?
scope_path = Pathname.new(scope['path'])
Pathname.new(sanitize_path(path)).ascend do |ascended_path|
if ascended_path.to_s == scope_path.to_s
Pathname.new(sanitize_path(path)).ascend do |path|
if path.to_s == scope_path.to_s
return true
end
end

View File

@@ -12,7 +12,6 @@ module Jekyll
# initial empty hooks
@registry = {
:site => {
:after_init => [],
:after_reset => [],
:post_read => [],
:pre_render => [],

View File

@@ -60,7 +60,7 @@ module Jekyll
#
# Returns the safety Boolean.
def self.safe(safe = nil)
if !defined?(@safe) || !safe.nil?
if safe
@safe = safe
end
@safe || false

View File

@@ -76,7 +76,7 @@ module Jekyll
#
# Returns an Array of plugin search paths
def plugins_path
if site.config['plugins_dir'] == Jekyll::Configuration::DEFAULTS['plugins_dir']
if site.config['plugins_dir'].eql? Jekyll::Configuration::DEFAULTS['plugins_dir']
[site.in_source_dir(site.config['plugins_dir'])]
else
Array(site.config['plugins_dir']).map { |d| File.expand_path(d) }

View File

@@ -8,14 +8,14 @@ module Jekyll
can_be_published?(thing) && !hidden_in_the_future?(thing)
end
def hidden_in_the_future?(thing)
thing.respond_to?(:date) && !@site.future && thing.date.to_i > @site.time.to_i
end
private
def can_be_published?(thing)
thing.data.fetch('published', true) || @site.unpublished
end
def hidden_in_the_future?(thing)
thing.respond_to?(:date) && !@site.future && thing.date.to_i > @site.time.to_i
end
end
end

View File

@@ -35,11 +35,7 @@ module Jekyll
read_content(dir, magic_dir, matcher).tap do |docs|
docs.each(&:read)
end.select do |doc|
site.publisher.publish?(doc).tap do |will_publish|
if !will_publish && site.publisher.hidden_in_the_future?(doc)
Jekyll.logger.debug "Skipping:", "#{doc.relative_path} has a future date"
end
end
site.publisher.publish?(doc)
end
end

View File

@@ -1,8 +1,6 @@
module Jekyll
class Regenerator
attr_reader :site, :metadata, :cache
attr_accessor :disabled
private :disabled, :disabled=
def initialize(site)
@site = site
@@ -117,7 +115,7 @@ module Jekyll
#
# Returns nothing.
def add_dependency(path, dependency)
return if metadata[path].nil? || disabled
return if metadata[path].nil? || @disabled
unless metadata[path]["deps"].include? dependency
metadata[path]["deps"] << dependency
@@ -146,8 +144,8 @@ module Jekyll
#
# Returns a Boolean (true for disabled, false for enabled).
def disabled?
self.disabled = !site.incremental? if disabled.nil?
disabled
@disabled = !site.incremental? if @disabled.nil?
@disabled
end
private

View File

@@ -40,8 +40,6 @@ module Jekyll
if document.is_a?(Document) && document.collection.label == 'posts'
payload['site']['related_posts'] = document.related_posts
else
payload['site']['related_posts'] = nil
end
# render and transform content (this becomes the final content of the object)
@@ -137,10 +135,13 @@ module Jekyll
used = Set.new([layout])
# Reset the payload layout data to ensure it starts fresh for each page.
payload["layout"] = nil
while layout
payload['content'] = output
payload['page'] = document.to_liquid
payload['layout'] = Utils.deep_merge_hashes(payload['layout'] || {}, layout.data)
payload['layout'] = Utils.deep_merge_hashes(layout.data, payload["layout"] || {})
output = render_liquid(
layout.content,

View File

@@ -17,31 +17,6 @@ module Jekyll
#
# config - A Hash containing site configuration details.
def initialize(config)
# Source and destination may not be changed after the site has been created.
@source = File.expand_path(config['source']).freeze
@dest = File.expand_path(config['destination']).freeze
self.config = config
@reader = Reader.new(self)
@regenerator = Regenerator.new(self)
@liquid_renderer = LiquidRenderer.new(self)
Jekyll.sites << self
Jekyll::Hooks.trigger :site, :after_init, self
reset
setup
end
# Public: Set the site's configuration. This handles side-effects caused by
# changing values in the configuration.
#
# config - a Jekyll::Configuration, containing the new configuration.
#
# Returns the new configuration.
def config=(config)
@config = config.clone
%w(safe lsi highlighter baseurl exclude include future unpublished
@@ -49,6 +24,17 @@ module Jekyll
self.send("#{opt}=", config[opt])
end
# Source and destination may not be changed after the site has been created.
@source = File.expand_path(config['source']).freeze
@dest = File.expand_path(config['destination']).freeze
@reader = Jekyll::Reader.new(self)
# Initialize incremental regenerator
@regenerator = Regenerator.new(self)
@liquid_renderer = LiquidRenderer.new(self)
self.plugin_manager = Jekyll::PluginManager.new(self)
self.plugins = plugin_manager.plugins_path
@@ -57,7 +43,10 @@ module Jekyll
self.permalink_style = config['permalink'].to_sym
@config
Jekyll.sites << self
reset
setup
end
# Public: Read, process, and write this Site to output.
@@ -273,6 +262,7 @@ module Jekyll
def site_payload
Drops::UnifiedPayloadDrop.new self
end
alias_method :to_liquid, :site_payload
# Get the implementation class for the given Converter.
# Returns the Converter instance implementing the given Converter.

View File

@@ -80,11 +80,7 @@ module Jekyll
FileUtils.mkdir_p(File.dirname(dest_path))
FileUtils.rm(dest_path) if File.exist?(dest_path)
if @site.safe || Jekyll.env == "production"
FileUtils.cp(path, dest_path)
else
FileUtils.copy_entry(path, dest_path)
end
FileUtils.cp(path, dest_path)
File.utime(@@mtimes[path], @@mtimes[path], dest_path)
true

View File

@@ -1,26 +0,0 @@
module Jekyll
module Tags
class Link < Liquid::Tag
TagName = 'link'
def initialize(tag_name, relative_path, tokens)
super
@relative_path = relative_path.strip
end
def render(context)
site = context.registers[:site]
site.docs_to_write.each do |document|
return document.url if document.relative_path == @relative_path
end
raise ArgumentError, "Could not find document '#{@relative_path}' in tag '#{TagName}'.\n\n" \
"Make sure the document exists and the path is correct."
end
end
end
end
Liquid::Template.register_tag(Jekyll::Tags::Link::TagName, Jekyll::Tags::Link)

View File

@@ -7,30 +7,22 @@ module Jekyll
def initialize(name)
@name = name
all, @path, @date, @slug = *name.sub(/^\//, "").match(MATCHER)
unless all
raise Jekyll::Errors::InvalidPostNameError,
"'#{name}' does not contain valid date and/or title."
end
raise ArgumentError.new("'#{name}' does not contain valid date and/or title.") unless all
@name_regex = /^#{path}#{date}-#{slug}\.[^.]+/
end
def post_date
@post_date ||= Utils.parse_date(date,
"\"#{date}\" does not contain valid date and/or title.")
end
def ==(other)
other.basename.match(@name_regex)
end
def deprecated_equality(other)
date = Utils.parse_date(name, "'#{name}' does not contain valid date and/or title.")
slug == post_slug(other) &&
post_date.year == other.date.year &&
post_date.month == other.date.month &&
post_date.day == other.date.day
date.year == other.date.year &&
date.month == other.date.month &&
date.day == other.date.day
end
private
@@ -55,13 +47,11 @@ module Jekyll
@orig_post = post.strip
begin
@post = PostComparer.new(@orig_post)
rescue => e
raise Jekyll::Errors::PostURLError, <<-eos
rescue
raise ArgumentError.new <<-eos
Could not parse name of post "#{@orig_post}" in tag 'post_url'.
Make sure the post exists and the name is correct.
#{e.class}: #{e.message}
eos
end
end
@@ -85,7 +75,7 @@ eos
return p.url
end
raise Jekyll::Errors::PostURLError, <<-eos
raise ArgumentError.new <<-eos
Could not find post "#{@orig_post}" in tag 'post_url'.
Make sure the post exists and the name is correct.

View File

@@ -1,4 +1,3 @@
module Jekyll
module Utils
extend self
@@ -54,6 +53,10 @@ module Jekyll
target.default_proc = overwrite.default_proc
end
target.each do |key, val|
target[key] = val.dup if val.frozen? && duplicable?(val)
end
target
end
@@ -61,6 +64,15 @@ module Jekyll
value.is_a?(Hash) || value.is_a?(Drops::Drop)
end
def duplicable?(obj)
case obj
when nil, false, true, Symbol, Numeric
false
else
true
end
end
# Read array from the supplied hash favouring the singular key
# and then the plural key, and handling any nil entries.
#
@@ -127,7 +139,7 @@ module Jekyll
def parse_date(input, msg = "Input could not be parsed.")
Time.parse(input).localtime
rescue ArgumentError
raise Errors::InvalidDateError, "Invalid date '#{input}': #{msg}"
raise Errors::FatalException.new("Invalid date '#{input}': " + msg)
end
# Determines whether a given file has

View File

@@ -1,3 +1,3 @@
module Jekyll
VERSION = '3.1.2'
VERSION = '3.1.6'
end

View File

@@ -1,17 +1,11 @@
# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing these this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
# which you are expected to set up once and rarely need to edit after that.
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Your awesome title
email: your-email@domain.com
description: > # this means to ignore newlines until "baseurl:"

View File

@@ -2,12 +2,12 @@
<div class="wrapper">
<h2 class="footer-heading">{{ site.title | escape }}</h2>
<h2 class="footer-heading">{{ site.title }}</h2>
<div class="footer-col-wrapper">
<div class="footer-col footer-col-1">
<ul class="contact-list">
<li>{{ site.title | escape }}</li>
<li>{{ site.title }}</li>
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
</ul>
</div>
@@ -29,7 +29,7 @@
</div>
<div class="footer-col footer-col-3">
<p>{{ site.description | escape }}</p>
<p>{{ site.description }}</p>
</div>
</div>

View File

@@ -4,9 +4,9 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description | escape }}{% endif %}">
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}">
</head>

View File

@@ -1,8 +1,8 @@
<header class="site-header" role="banner">
<header class="site-header">
<div class="wrapper">
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title | escape }}</a>
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
<nav class="site-nav">
<a href="#" class="menu-icon">
@@ -16,7 +16,7 @@
<div class="trigger">
{% for my_page in site.pages %}
{% if my_page.title %}
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title | escape }}</a>
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title }}</a>
{% endif %}
{% endfor %}
</div>

View File

@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html>
{% include head.html %}
@@ -7,11 +7,11 @@
{% include header.html %}
<main class="page-content" aria-label="Content">
<div class="page-content">
<div class="wrapper">
{{ content }}
</div>
</main>
</div>
{% include footer.html %}

View File

@@ -4,7 +4,7 @@ layout: default
<article class="post">
<header class="post-header">
<h1 class="post-title">{{ page.title | escape }}</h1>
<h1 class="post-title">{{ page.title }}</h1>
</header>
<div class="post-content">

View File

@@ -4,7 +4,7 @@ layout: default
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
</header>

View File

@@ -177,10 +177,13 @@ pre {
/**
* Clearfix
*/
%clearfix:after {
content: "";
display: table;
clear: both;
%clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@@ -188,13 +191,16 @@ pre {
/**
* Icons
*/
.icon > svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
.icon {
path {
fill: $grey-color;
> svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
path {
fill: $grey-color;
}
}
}

View File

@@ -12,7 +12,7 @@ layout: default
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
<h2>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title | escape }}</a>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</h2>
</li>
{% endfor %}

View File

@@ -6,7 +6,7 @@
desc "Release #{name} v#{version}"
task :release => :build do
unless `git branch` =~ /^\* master$/
unless `git branch` =~ /^\* 3\.1-stable$/
puts "You must be on the master branch to release!"
exit!
end

View File

@@ -5,7 +5,7 @@
#############################################################################
namespace :site do
task :generated_pages => [:history, :version_file, :conduct, :contributing]
task :generated_pages => [:history, :version_file, :conduct]
desc "Generate and view the site locally"
task :preview => :generated_pages do
@@ -103,21 +103,41 @@ namespace :site do
desc "Create a nicely formatted history page for the jekyll site based on the repo history."
task :history do
siteify_file('History.markdown')
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
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
}
siteify_file('CONDUCT.markdown', front_matter)
end
desc "Copy the contributing file"
task :contributing do
siteify_file('.github/CONTRIBUTING.markdown', "title" => "Contributing")
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
end
desc "Write the site latest_version.txt file"

View File

@@ -14,7 +14,6 @@ INGORE_HREFS=$(ruby -e 'puts %w{
twitter.com
nearlyfreespeech.net
eduardoboucas.com
github.com\/matrix9180
}.map{|h| "/#{h}/"}.join(",")')
SOURCE="site"
DESTINATION="_site"
@@ -32,4 +31,4 @@ bundle exec jekyll build -s $SOURCE -d $DESTINATION --trace
# 3.
msg "Proofing..."
time bundle exec htmlproof ./$DESTINATION --url-ignore $INGORE_HREFS
time bundle exec htmlproof ./$DESTINATION --href-ignore $INGORE_HREFS

View File

@@ -5,7 +5,6 @@ excerpt_separator: ""
gauges_id: 503c5af6613f5d0f19000027
google_analytics_id: UA-50755011-1
google_site_verification: onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY
repository: https://github.com/jekyll/jekyll
help_url: https://github.com/jekyll/jekyll-help
@@ -18,17 +17,9 @@ collections:
name: Jekyll • Simple, blog-aware, static sites
description: Transform your plain text into static websites and blogs
url: https://jekyllrb.com
twitter:
username: jekyllrb
logo: img/logo-2x.png
url: http://jekyllrb.com
gems:
- jekyll-feed
- jekyll-redirect-from
- jemoji
- jekyll-sitemap
- jekyll-seo-tag
- jekyll-avatar

View File

@@ -6,8 +6,8 @@ permalink: /docs/assets/
Jekyll provides built-in support for Sass and can work with CoffeeScript via
a Ruby gem. In order to use them, you must first create a file with the
proper extension name (one of `.sass`, `.scss`, or `.coffee`) and ***start the
file with two lines of triple dashes***, like this:
proper extension name (one of `.sass`, `.scss`, or `.coffee`) and start the
file with two lines of triple dashes, like this:
{% highlight sass %}
---
@@ -26,7 +26,7 @@ will process it and put it in your site's destination folder under
<div class="note info">
<h5>Jekyll processes all Liquid filters and tags in asset files</h5>
<p>If you are using <a href="https://mustache.github.io">Mustache</a>
<p>If you are using <a href="http://mustache.github.io">Mustache</a>
or another JavaScript templating language that conflicts with
the <a href="/docs/templates/">Liquid template syntax</a>, you
will need to place <code>{&#37; raw &#37;}</code> and

View File

@@ -4,6 +4,13 @@ title: Collections
permalink: /docs/collections/
---
<div class="note warning">
<h5>Collections support is unstable and may change</h5>
<p>
This is an experimental feature and the API may change until the feature stabilizes.
</p>
</div>
Not everything is a post or a page. Maybe you want to document the various
methods in your open source project, members of a team, or talks at a
conference. Collections allow you to define a new type of document that behave
@@ -303,8 +310,11 @@ file, each document has the following attributes:
</td>
<td>
<p>
The URL of the rendered collection. The file is only written to the destination when the collection to which it belongs has <code>output: true</code> in the site's configuration.
</p>
The URL of the rendered collection. The file is only written to the
destination when the name of the collection to which it belongs is
included in the <code>render</code> key in the site's configuration
file.
</p>
</td>
</tr>
<tr>

View File

@@ -1,8 +1,7 @@
---
title: Code of Conduct
layout: docs
title: Code of Conduct
permalink: "/docs/conduct/"
note: This file is autogenerated. Edit /CONDUCT.markdown instead.
redirect_from: "/conduct/index.html"
editable: false
---

View File

@@ -106,9 +106,9 @@ class="flag">flags</code> (specified on the command-line) that control them.
Set the time zone for site generation. This sets the <code>TZ</code>
environment variable, which Ruby uses to handle time and date
creation and manipulation. Any entry from the
<a href="https://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
<a href="http://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
Database</a> is valid, e.g. <code>America/New_York</code>. A list of all
available values can be found <a href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">
available values can be found <a href="http://en.wikipedia.org/wiki/List_of_tz_database_time_zones">
here</a>. The default is the local time zone, as set by your operating system.
</p>
</td>
@@ -214,7 +214,7 @@ class="flag">flags</code> (specified on the command-line) that control them.
<tr class="setting">
<td>
<p class="name"><strong>Future</strong></p>
<p class="description">Publish posts or collection documents with a future date.</p>
<p class="description">Publish posts with a future date.</p>
</td>
<td class="align-center">
<p><code class="option">future: BOOL</code></p>

View File

@@ -31,7 +31,7 @@ does ensure things are built properly.
When testing Jekyll output, there is no better tool than [html-proofer][2].
This tool checks your resulting site to ensure all links and images exist.
Utilize it either with the convenient `htmlproofer` command-line executable,
Utilize it either with the convenient `htmlproof` command-line executable,
or write a Ruby script which utilizes the gem.
Save the commands you want to run and succeed in a file: `./script/cibuild`
@@ -43,17 +43,17 @@ Save the commands you want to run and succeed in a file: `./script/cibuild`
set -e # halt script on error
bundle exec jekyll build
bundle exec htmlproofer ./_site
bundle exec htmlproof ./_site
{% endhighlight %}
Some options can be specified via command-line switches. Check out the
`html-proofer` README for more information about these switches, or run
`htmlproofer --help` locally.
`htmlproof --help` locally.
For example to avoid testing external sites, use this command:
{% highlight bash %}
$ bundle exec htmlproofer ./_site --disable-external
$ bundle exec htmlproof ./_site --disable-external
{% endhighlight %}
### The HTML Proofer Library
@@ -80,7 +80,7 @@ with Ruby and requires RubyGems to install, we use the Ruby language build
environment. Below is a sample `.travis.yml` file, followed by
an explanation of each line.
**Note:** You will need a Gemfile as well, [Travis will automatically install](https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management) the dependencies based on the referenced gems:
**Note:** You will need a Gemfile as well, [Travis will automatically install](http://docs.travis-ci.com/user/languages/ruby/#Dependency-Management) the dependencies based on the referenced gems:
{% highlight ruby %}
source "https://rubygems.org"
@@ -112,8 +112,6 @@ branches:
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build
{% endhighlight %}
Ok, now for an explanation of each line:
@@ -156,7 +154,7 @@ incantation here directly:
{% highlight yaml %}
install: gem install jekyll html-proofer
script: jekyll build && htmlproofer ./_site
script: jekyll build && htmlproof ./_site
{% endhighlight %}
The `script` directive can be absolutely any valid shell command.
@@ -204,16 +202,6 @@ environment variable `NOKOGIRI_USE_SYSTEM_LIBRARIES` to `true`.
exclude: [vendor]
{% endhighlight %}
By default you should supply the `sudo: false` command to Travis. This command
explicitly tells Travis to run your build on Travis's [container-based
infrastructure](https://docs.travis-ci.com/user/workers/container-based-infrastructure/#Routing-your-build-to-container-based-infrastructure). Running on the container-based infrastructure can often times
speed up your build. If you have any trouble with your build, or if your build
does need `sudo` access, modify the line to `sudo: required`.
{% highlight yaml %}
sudo: false
{% endhighlight %}
### Troubleshooting
**Travis error:** *"You are trying to install in deployment mode after changing
@@ -230,4 +218,4 @@ This entire guide is open-source. Go ahead and [edit it][3] if you have a
fix or [ask for help][4] if you run into trouble and need some help.
[3]: https://github.com/jekyll/jekyll/edit/master/site/_docs/continuous-integration.md
[4]: https://jekyllrb.com/help/
[4]: http://jekyllrb.com/help/

View File

@@ -1,127 +1,124 @@
---
title: Contributing
layout: docs
permalink: "/docs/contributing/"
note: This file is autogenerated. Edit /.github/CONTRIBUTING.markdown instead.
title: Contributing
permalink: /docs/contributing/
---
Hi there! Interested in contributing to Jekyll? We'd love your help. Jekyll is an open source project, built one contribution at a time by users like you.
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
following in mind:
## Where to get help or report a problem
* **Use https://talk.jekyllrb.com for non-technical or indirect Jekyll questions that are not bugs.**
* **Contributions will not be accepted without tests or necessary documentation updates.**
* If you're creating a small fix or patch to an existing feature, just a simple
test will do. Please stay in the confines of the current test suite and use
[Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and
[RSpec-Mocks](https://github.com/rspec/rspec-mocks).
* If it's a brand new feature, make sure to create a new
[Cucumber](https://github.com/cucumber/cucumber/) feature and reuse steps
where appropriate. Also, whipping up some documentation in your fork's `site`
would be appreciated, and once merged it will be transferred over to the main
`site`, jekyllrb.com.
* If your contribution changes any Jekyll behavior, make sure to update the
documentation. It lives in `site/_docs`. If the docs are missing information,
please feel free to add it in. Great docs make a great project!
* Please follow the [GitHub Ruby Styleguide](https://github.com/styleguide/ruby)
when modifying Ruby code.
* Please do your best to submit **small pull requests**. The easier the proposed
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)
will also speed up review time.
* If you have a question about using Jekyll, start a discussion on [Jekyll Talk](https://talk.jekyllrb.com).
* If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository.
* If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new)
* More resources are listed on our [Help page](https://jekyllrb.com/help/)
<div class="note warning">
<h5>Contributions will not be accepted without tests</h5>
<p>
If youre creating a small fix or patch to an existing feature, just
a simple test will do.
</p>
</div>
## Ways to contribute
Whether you're a developer, a designer, or just a Jekyll devotee, there are lots of ways to contribute. Here's a few ideas:
Test Dependencies
-----------------
* [Install Jekyll on your computer](https://jekyllrb.com/docs/installation/) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/jekyll/jekyll/issues/new) and let us know.
* Comment on some of the project's [open issues](https://github.com/jekyll/jekyll/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better?
* Read through [the documentation](https://jekyllrb.com/docs/home/), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved.
* Browse through [the Jekyll discussion forum](https://talk.jekyllrb.com/), and lend a hand answering questions. There's a good chance you've already experienced what another user is experiencing.
* Find [an open issue](https://github.com/jekyll/jekyll/issues) (especially [those labeled `help-wanted`](https://github.com/jekyll/jekyll/issues?q=is%3Aopen+is%3Aissue+label%3Ahelp-wanted)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions.
* Help evaluate [open pull requests](https://github.com/jekyll/jekyll/pulls), by testing the changes locally and reviewing what's proposed.
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:
## Submitting a pull request
<figure class="highlight"><pre><code>$ script/bootstrap</code></pre></figure>
### Pull requests generally
Before you start, run the tests and make sure that they pass (to confirm your
environment is configured properly):
* The smaller the proposed change, the better. If you'd like to propose two unrelated changes, submit two pull requests.
* The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.
* Pull request are easy and fun. If this is your first pull request, it may help to [understand GitHub Flow](https://guides.github.com/introduction/flow/)
* If you're submitting a code contribution, be sure to read the [code contributions](#code-contributions) section below.
### Submitting a pull request via github.com
Many small changes can be made entirely through the github.com web interface.
1. Navigate to the file within [`jekyll/jekyll`](https://github.com/jekyll/jekyll) that you'd like to edit
2. Click the pencil icon in the top right corner to edit the file
3. Make your proposed changes
4. Click "Propose file change"
5. Click "Create pull request"
6. Add a descriptive title and detailed description for your proposed change. The more information the better.
7. Click "Create pull request"
That's it! You'll be automatically subscribed to receive updates as others review your proposed change and provide feedback.
### Submitting a pull request via Git command line
1. Fork the project by clicking "Fork" in the top right corner of [`jekyll/jekyll`](https://github.com/jekyll/jekyll)
2. Clone the repository lcoally `git clone https://github.com/<you-username>/jekyll`
3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ).
4. Hack away, add tests. Not necessarily in that order.
5. Make sure everything still passes by running `script/cibuild` (see [the tests section](#running-tests-locally) below)
6. Push the branch up ( `git push origin my-awesome-feature` ).
7. Create a pull request by visiting https://github.com/<your-username>/jekyll/ and following the instructions at the top of the screen.
## Proposing updates to the documentation
We want the Jekyll documentation to be the best it can be. We've open-sourced our docs and we welcome any pull requests if you find it lacking.
### How to submit changes
You can find the documentation for jekyllrb.com in the [site](https://github.com/jekyll/jekyll/tree/master/site) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change.
One gotcha, all pull requests should be directed at the `master` branch (the default branch).
### Adding plugins
If you want to add your plugin to the [list of plugins](https://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.
## Code Contributions
Interesting in submitting a pull request? Awesome. Read on. There's a few common gotchas that we'd love to help you avoid.
### Tests and documentation
Any time you propose a code change, you should also include updates to the documentation and tests within the same pull request.
#### Documentation
If your contribution changes any Jekyll behavior, make sure to update the documentation. Documentation lives in the `site/_docs` folder (spoiler alert: it's a Jekyll site!). If the docs are missing information, please feel free to add it in. Great docs make a great project. Include changes to the documentation within your pull request, and once merged, `jekyllrb.com` will be updated.
#### Tests
* If you're creating a small fix or patch to an existing feature, a simple test is more than enough. You can usually copy/paste from an existing example in the `tests` folder, but if you need you can find out about our tests suites [Shoulda](https://github.com/thoughtbot/shoulda/tree/master) and [RSpec-Mocks](https://github.com/rspec/rspec-mocks).
* If it's a brand new feature, create a new [Cucumber](https://github.com/cucumber/cucumber/) feature, reusing existing steps where appropriate.
### Code contributions generally
* Jekyll follows the [GitHub Ruby Styleguide](https://github.com/styleguide/ruby).
* Don't bump the Gem version in your pull request (if you don't know what that means, you probably didn't).
## Running tests locally
### Test Dependencies
To run the test suite and build the gem you'll need to install Jekyll's dependencies by running the following command:
<pre class="highlight"><code>$ script/bootstrap</code></pre>
Before you make any changes, run the tests and make sure that they pass (to confirm your environment is configured properly):
<pre class="highlight"><code>$ script/cibuild</code></pre>
<figure class="highlight"><pre><code>$ script/cibuild</code></pre></figure>
If you are only updating a file in `test/`, you can use the command:
<pre class="highlight"><code>$ script/test test/blah_test.rb</code></pre>
<figure class="highlight"><pre><code>$ script/test test/blah_test.rb</code></pre></figure>
If you are only updating a `.feature` file, you can use the command:
<pre class="highlight"><code>$ script/cucumber features/blah.feature</code></pre>
<figure class="highlight"><pre><code>$ script/cucumber features/blah.feature</code></pre></figure>
Both `script/test` and `script/cucumber` can be run without arguments to
run its entire respective suite.
## A thank you
Workflow
--------
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!
Here's the most direct way to get your work merged into the project:
* 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.
* Make sure everything still passes by running `script/cibuild`.
* If necessary, rebase your commits into logical chunks, without errors.
* Push the branch up ( `git push origin my_awesome_feature` ).
* Create a pull request against jekyll/jekyll and describe what your change
does and the why you think it should be merged.
Updating Documentation
----------------------
We want the Jekyll documentation to be the best it can be. We've
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
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
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
link to your plugin under the proper subheading depending upon its type.
Gotchas
-------
* Please do not bump the gem version in your pull requests.
* Try to keep your patch(es) based from the latest commit on jekyll/jekyll.
The easier it is to apply your work, the less work the maintainers have to do,
which is always a good thing.
* Please don't tag your GitHub issue with [fix], [feature], etc. The maintainers
actively read the issues and will label it once they come across it.
Finally...
----------
<div class="note">
<h5>Let us know what could be better!</h5>
<p>
Both using and hacking on Jekyll should be fun, simple, and easy, so if for
some reason you find its a pain, please <a
href="{{ site.repository }}/issues/new">create an issue</a> on
GitHub describing your experience so we can make it better.
</p>
</div>

View File

@@ -25,8 +25,7 @@ There are also a number of ways to easily automate the deployment of a Jekyll si
### Git post-update hook
If you store your Jekyll site in [Git](https://git-scm.com/) (you are using
version control, right?), its pretty easy to automate the
If you store your Jekyll site in [Git](http://git-scm.com/) (you are using version control, right?), its pretty easy to automate the
deployment process by setting up a post-update hook in your Git
repository, [like
this](http://web.archive.org/web/20091223025644/http://www.taknado.com/en/2009/03/26/deploying-a-jekyll-generated-site/).
@@ -97,14 +96,7 @@ Another way to deploy your Jekyll site is to use [Rake](https://github.com/ruby/
### scp
Once youve generated the `_site` directory, you can easily scp it using a
`tasks/deploy` shell script similar to [this deploy script][]. Youd obviously
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
[a matching TextMate command]: https://gist.github.com/henrik/214959
Once youve generated the `_site` directory, you can easily scp it using a `tasks/deploy` shell script similar to [this deploy script here](https://github.com/henrik/henrik.nyh.se/blob/master/script/deploy). Youd obviously need to change the values to reflect your sites details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run this script from within Textmate.
### rsync
@@ -117,7 +109,7 @@ process. It makes sense to restrict rsync access only to the directory which it
If it is not already installed by your host, you can do it yourself:
- [Download rrsync](https://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
- [Download rrsync](http://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
- Place it in the `bin` subdirectory of your home folder (`~/bin`)
- Make it executable (`chmod +x`)
@@ -219,9 +211,3 @@ 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.

View File

@@ -9,10 +9,10 @@ may want to install, depending on how you plan to use Jekyll.
## Math Support
Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](https://www.mathjax.org) within math blocks. See the Kramdown documentation on [math blocks](http://kramdown.gettalong.org/syntax.html#math-blocks) and [math support](http://kramdown.gettalong.org/converter/html.html#math-support) for more details. MathJax requires you to include JavaScript or CSS to render the LaTeX, e.g.
Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](http://www.mathjax.org/) within math blocks. See the Kramdown documentation on [math blocks](http://kramdown.gettalong.org/syntax.html#math-blocks) and [math support](http://kramdown.gettalong.org/converter/html.html#math-support) for more details. MathJax requires you to include JavaScript or CSS to render the LaTeX, e.g.
{% highlight html %}
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
{% endhighlight %}
For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/opinion/2014/02/16/Mathjax-with-jekyll/).

View File

@@ -108,7 +108,7 @@ front matter of a page or post.
more categories that the post belongs to. When the site is generated
the post will act as though it had been set with these categories
normally. Categories (plural key) can be specified as a <a
href="https://en.wikipedia.org/wiki/YAML#Lists">YAML list</a> or a
href="http://en.wikipedia.org/wiki/YAML#Lists">YAML list</a> or a
comma-separated string.
</p>

View File

@@ -4,7 +4,7 @@ title: GitHub Pages
permalink: /docs/github-pages/
---
[GitHub Pages](https://pages.github.com) are public web pages for users,
[GitHub Pages](http://pages.github.com) are public web pages for users,
organizations, and repositories, that are freely hosted on GitHub's
`github.io` domain or on a custom domain name of your choice. GitHub Pages are
powered by Jekyll behind the scenes, so in addition to supporting regular HTML
@@ -117,7 +117,7 @@ branch]({{ site.repository }}/tree/gh-pages) of the same repository.
<div class="note warning">
<h5>Source Files Must be in the Root Directory</h5>
<p>
GitHub Pages <a href="https://help.github.com/articles/troubleshooting-github-pages-build-failures#source-setting">overrides</a> the <a href="/docs/configuration/#global-configuration">“Site Source”</a> configuration value, so if you locate your files anywhere other than the root directory, your site may not build correctly.
GitHub Pages <a href="https://help.github.com/articles/troubleshooting-github-pages-build-failures#source-setting">overrides</a> the <a href="http://jekyllrb.com/docs/configuration/#global-configuration">“Site Source”</a> configuration value, so if you locate your files anywhere other than the root directory, your site may not build correctly.
</p>
</div>

View File

@@ -1,10 +1,41 @@
---
title: History
layout: docs
title: History
permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---
## 3.1.6 / 2016-05-19
{: #v3-1-6}
### Bug Fixes
{: #bug-fixes-v3-1-6}
- Add ability to `jsonify` Drops such that, e.g. `site | jsonify`, works. ([#4914]({{ site.repository }}/issues/4914))
## 3.1.5 / 2016-05-18
{: #v3-1-5}
### Bug Fixes
{: #bug-fixes-v3-1-5}
- Sort the results of the `require_all` glob (affects Linux only). ([#4912]({{ site.repository }}/issues/4912))
## 3.1.4 / 2016-05-18
{: #v3-1-4}
### Bug Fixes
{: #bug-fixes-v3-1-4}
- Add `ExcerptDrop` and remove excerpt's ability to refer to itself in Liquid ([#4907]({{ site.repository }}/issues/4907))
- Configuration permalink fix where `collections.posts.permalink` inherits properly from `permalink` only when it doesn't exist ([#4910]({{ site.repository }}/issues/4910))
- Add `Configuration.from` to make it easier to build configs from just a hash
- Sorting `site.collections` in Liquid by label ([#4910]({{ site.repository }}/issues/4910))
- Fix bug where `layout` in Liquid would inherit from previously-rendered layouts' metadatas ([#4909]({{ site.repository }}/issues/4909))
- Fix bug where `layout` in Liquid would override in the wrong direction (more-specific layouts' data were overwritten by their parent layouts' data; this has now been reversed) ([#4909]({{ site.repository }}/issues/4909))
## 3.1.2 / 2016-02-19
{: #v3-1-2}
@@ -1063,7 +1094,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Patch a couple show-stopping security vulnerabilities ([#1946]({{ site.repository }}/issues/1946))
- Sanitize paths uniformly, in a Windows-friendly way ([#2065]({{ site.repository }}/issues/2065), [#2109]({{ site.repository }}/issues/2109))
- Update gem build steps to work correctly on Windows ([#2118]({{ site.repository }}/issues/2118))
- Remove obsolete `normalize_options` method call from `bin/jekyll` ([#2121]({{ site.repository }}/issues/2121))
- Remove obsolete `normalize_options` method call from `bin/jekyll` ([#2121]({{ site.repository }}/issues/2121)).
- Remove `+` characters from Pygments lexer names when adding as a CSS class ([#994]({{ site.repository }}/issues/994))
- Remove some code that caused Ruby interpreter warnings ([#2178]({{ site.repository }}/issues/2178))
- Only strip the drive name if it begins the string ([#2175]({{ site.repository }}/issues/2175))
@@ -2061,7 +2092,7 @@ note: This file is autogenerated. Edit /History.markdown instead.
- Bug Fixes
- Fix pagination % 0 bug ([#78]({{ site.repository }}/issues/78))
- Ensure all posts are processed first ([#71]({{ site.repository }}/issues/71))
- Ensure all posts are processed first ([#71]({{ site.repository }}/issues/71)) ## NOTE
- After this point I will no longer be giving credit in the history; that is what the commit log is for.

View File

@@ -15,11 +15,11 @@ development of Jekyll itself.
Jekyll is a simple, blog-aware, static site generator. It takes a template
directory containing raw text files in various formats, runs it through
a converter (like [Markdown](https://daringfireball.net/projects/markdown/))
a converter (like [Markdown](http://daringfireball.net/projects/markdown/))
and our [Liquid](https://github.com/Shopify/liquid/wiki) renderer, and
spits out a complete, ready-to-publish static website suitable
for serving with your favorite web server. Jekyll also happens to be the engine
behind [GitHub Pages](https://pages.github.com), which means you can use Jekyll
behind [GitHub Pages](http://pages.github.com), which means you can use Jekyll
to host your projects page, blog, or website from GitHubs servers **for
free**.

View File

@@ -14,11 +14,11 @@ encountered and how we might make the process easier
Installing Jekyll is easy and straight-forward, but there are a few
requirements youll need to make sure your system has before you start.
- [Ruby](https://www.ruby-lang.org/en/downloads/) (including development
- [Ruby](http://www.ruby-lang.org/en/downloads/) (including development
headers, v1.9.3 or above for Jekyll 2 and v2 or above for Jekyll 3)
- [RubyGems](https://rubygems.org/pages/download)
- [RubyGems](http://rubygems.org/pages/download)
- Linux, Unix, or Mac OS X
- [NodeJS](https://nodejs.org/), or another JavaScript runtime (Jekyll 2 and
- [NodeJS](http://nodejs.org), or another JavaScript runtime (Jekyll 2 and
earlier, for CoffeeScript support).
- [Python 2.7](https://www.python.org/downloads/) (for Jekyll 2 and earlier)

View File

@@ -6,4 +6,4 @@ permalink: /docs/migrations/
If youre switching to Jekyll from another blogging system, Jekylls importers
can help you with the move. To learn more about importing your site to Jekyll,
visit our [`jekyll-import` docs site](https://import.jekyllrb.com/docs/home/).
visit our [`jekyll-import` docs site](http://import.jekyllrb.com/docs/home/).

View File

@@ -27,11 +27,11 @@ homepage of your Jekyll-generated site.
## Where additional pages live
Where you put HTML or [Markdown](https://daringfireball.net/projects/markdown/)
Where you put HTML or [Markdown](http://daringfireball.net/projects/markdown/)
files for pages depends on how you want the pages to work.
There are two main ways of creating pages:
- Place named HTML or [Markdown](https://daringfireball.net/projects/markdown/)
- Place named HTML or [Markdown](http://daringfireball.net/projects/markdown/)
files for each page in your site's root folder.
- Create a folder in the site's root for each page, and place an index.html
or index.md file in each page folder.

View File

@@ -11,7 +11,7 @@ having to modify the Jekyll source itself.
<div class="note info">
<h5>Plugins on GitHub Pages</h5>
<p>
<a href="https://pages.github.com/">GitHub Pages</a> is powered by Jekyll.
<a href="http://pages.github.com/">GitHub Pages</a> is powered by Jekyll.
However, all Pages sites are generated using the <code>--safe</code> option
to disable custom plugins for security reasons. Unfortunately, this means
your plugins wont work if youre deploying to GitHub Pages.<br><br>
@@ -311,7 +311,7 @@ Commands should implement this single class method:
</td>
<td><p>
This method accepts one parameter, the
<code><a href="https://github.com/jekyll/mercenary#readme">Mercenary::Program</a></code>
<code><a href="http://github.com/jekyll/mercenary#readme">Mercenary::Program</a></code>
instance, which is the Jekyll program itself. Upon the program,
commands may be created using the above syntax. For more details,
visit the Mercenary repository on GitHub.com.
@@ -516,18 +516,6 @@ The complete list of available hooks is below:
</tr>
</thead>
<tbody>
<tr>
<td>
<p><code>:site</code></p>
</td>
<td>
<p><code>:after_init</code></p>
</td>
<td>
<p>Just after the site initializes, but before setup & render. Good
for modifying the configuration of the site.</p>
</td>
</tr>
<tr>
<td>
<p><code>:site</code></p>
@@ -857,7 +845,6 @@ 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 `<figure>` 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
@@ -897,8 +884,6 @@ LESS.js files during generation.
- [Jekyll Language Plugin](https://github.com/vwochnik/jekyll-language-plugin): Jekyll 3.0-compatible multi-language plugin for posts, pages and includes.
- [Jekyll Deploy](https://github.com/vwochnik/jekyll-deploy): Adds a `deploy` sub-command to Jekyll.
- [Official Contentful Jekyll Plugin](https://github.com/contentful/jekyll-contentful-data-import): Adds a `contentful` sub-command to Jekyll to import data from Contentful.
- [jekyll-paspagon](https://github.com/KrzysiekJ/jekyll-paspagon): Sell your posts in various formats for cryptocurrencies.
- [Hawkins](https://github.com/awood/hawkins): Adds a `liveserve` sub-command to Jekyll that incorporates [LiveReload](http://livereload.com/) into your pages while you preview them. No more hitting the refresh button in your browser!
#### Editors

View File

@@ -15,7 +15,7 @@ CMS systems, this will be a welcome change!
As explained on the [directory structure](../structure/) page, the `_posts`
folder is where your blog posts will live. These files are generally
[Markdown](https://daringfireball.net/projects/markdown/) or HTML, but can
[Markdown](http://daringfireball.net/projects/markdown/) or HTML, but can
be other formats with the proper converter installed.
All posts must have [YAML Front Matter](../frontmatter/), and they will be
converted from their source format into an HTML page that is part of your
@@ -53,7 +53,7 @@ file. For example, the following are examples of valid post filenames:
All blog post files must begin with [YAML Front Matter](../frontmatter/). After
that, it's simply a matter of deciding which format you prefer. Jekyll supports
[Markdown](https://daringfireball.net/projects/markdown/) out of the box,
[Markdown](http://daringfireball.net/projects/markdown/) out of the box,
and has [myriad extensions for other formats as well](/docs/plugins/#converters-1),
including the popular [Textile](http://redcloth.org/textile) format. These
formats each have their own way of marking up different types of content
@@ -116,8 +116,8 @@ Linking to a PDF for readers to download:
Its all well and good to have posts in a folder, but a blog is no use unless
you have a list of posts somewhere. Creating an index of posts on another page
(or in a [template](../templates/)) is easy, thanks to the [Liquid template
language](https://docs.shopify.com/themes/liquid/basics) and its tags. Heres a
basic example of how to create a list of links to your blog posts:
language](http://wiki.shopify.com/Liquid) and its tags. Heres a basic example
of how to create a list of links to your blog posts:
{% highlight html %}
<ul>

View File

@@ -14,7 +14,7 @@ Jekylls 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 @@ Jekylls growing use is producing a wide variety of tutorials, frameworks, ext
### Other commentary
- [My Jekyll Fork, by Mike West](https://mikewest.org/2009/11/my-jekyll-fork)
- [My Jekyll Fork, by Mike West](http://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 its core. Here, Ill point out some highlights of my fork in the hopes that they see usage beyond this site.”
@@ -35,4 +35,4 @@ Jekylls growing use is producing a wide variety of tutorials, frameworks, ext
- [Generating a Tag Cloud in Jekyll](http://www.justkez.com/generating-a-tag-cloud-in-jekyll/) A guide to implementing a tag cloud and per-tag content pages using Jekyll.
- A way to [extend Jekyll](https://github.com/rfelix/jekyll_ext) without forking and modifying the Jekyll gem codebase and some [portable Jekyll extensions](https://wiki.github.com/rfelix/jekyll_ext/extensions) that can be reused and shared.
- [Using your Rails layouts in Jekyll](http://numbers.brighterplanet.com/2010/08/09/sharing-rails-views-with-jekyll)
- [Adding Ajax pagination to Jekyll](https://eduardoboucas.com/blog/2014/11/05/adding-ajax-pagination-to-jekyll.html)
- [Adding Ajax pagination to Jekyll](https://eduardoboucas.com/blog/2014/11/10/adding-ajax-pagination-to-jekyll.html)

View File

@@ -271,39 +271,6 @@ common tasks easier.
</p>
</td>
</tr>
<tr>
<td>
<p class="name"><strong>Array Filters</strong></p>
<p>Push, pop, shift, and unshift elements from an Array.</p>
<p>These are <strong>NON-DESTRUCTIVE</strong>, i.e. they do not mutate the array, but rather make a copy and mutate that.</p>
</td>
<td class="align-center">
<p>
<code class="filter">{% raw %}{{ page.tags | push: 'Spokane' }}{% endraw %}</code>
</p>
<p>
<code class="output">['Seattle', 'Tacoma', 'Spokane']</code>
</p>
<p>
<code class="filter">{% raw %}{{ page.tags | pop }}{% endraw %}</code>
</p>
<p>
<code class="output">['Seattle']</code>
</p>
<p>
<code class="filter">{% raw %}{{ page.tags | shift }}{% endraw %}</code>
</p>
<p>
<code class="output">['Tacoma']</code>
</p>
<p>
<code class="filter">{% raw %}{{ page.tags | unshift: "Olympia" }}{% endraw %}</code>
</p>
<p>
<code class="output">['Olympia', 'Seattle', 'Tacoma']</code>
</p>
</td>
</tr>
</tbody>
</table>
</div>

View File

@@ -30,13 +30,6 @@ On Red Hat, CentOS, and Fedora systems you can do this by running:
sudo yum install ruby-devel
{% endhighlight %}
If you installed the above - specifically on Fedora 23 - but the extensions would still not compile, you are probably running a Fedora image that misses the `redhat-rpm-config` package. To solve this, simply run:
{% highlight bash %}
sudo dnf install redhat-rpm-config
{% endhighlight %}
On [NearlyFreeSpeech](https://www.nearlyfreespeech.net/) you need to run the
following commands before installing Jekyll:

View File

@@ -123,8 +123,4 @@ date: 2016-02-06 19:32:10 -0800
---
{% endhighlight %}
### My categories have stopped working!
If you organized your categories as `/_posts/code/2008-12-24-closures.md`, you will need to restructure your directories to put the categories _above_ the `_posts` directories, as follows: `/code/_posts/2008-12-24-closures.md`.
_Did we miss something? Please click "Improve this page" above and add a section. Thanks!_

View File

@@ -353,7 +353,7 @@ following is a reference of the available data.
</tr>
<tr>
<td><p><code>paginator.total_pages</code></p></td>
<td><p>Total number of pages.</p></td>
<td><p>Total number of Pages.</p></td>
</tr>
<tr>
<td><p><code>paginator.page</code></p></td>

View File

@@ -15,7 +15,7 @@ Julian Thilo has written up instructions to get
people. The instructions were written for Ruby 2.0.0, but should work for later
versions [prior to 2.2][hitimes-issue].
Alternatively David Burela has written instructions on [how to install Jekyll via Chocolatey with 3 command prompt entries](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/).
Alternatively David Burela has written instructions on [how to install Jekyll via Chocolately with 3 command prompt entries](https://davidburela.wordpress.com/2015/11/28/easily-install-jekyll-on-windows-with-3-command-prompt-entries-and-chocolatey/).
## Encoding

View File

@@ -14,8 +14,7 @@
{{ post.date | date_to_string }}
</span>
<a href="https://github.com/{{ post.author }}" class="post-author">
{% assign author = post.author %}
{% avatar user=author size=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

@@ -2,6 +2,7 @@
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>{{ page.title }}</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Jekyll v{{ jekyll.version }}">
{% feed_meta %}
@@ -9,7 +10,6 @@
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic,900">
<link rel="stylesheet" href="/css/screen.css">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
{% seo %}
<!--[if lt IE 9]>
<script src="/js/html5shiv.min.js"></script>
<script src="/js/respond.min.js"></script>

View File

@@ -17,7 +17,7 @@ layout: news
{{ page.date | date_to_string }}
</span>
<a href="https://github.com/{{ page.author }}" class="post-author">
{% avatar {{ page.author}} size=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

@@ -1,17 +0,0 @@
---
title: Making it easier to contribute to Jekyll
description: We've made it easier to contribute to Jekyll by updating our contributing documentation and introducing Jekyll Affinity Teams, teams dedicated to specific aspects of the project.
layout: news_item
author: benbalter
categories: [community]
---
Jekyll is an open source project, built one contribution at a time by community members just like you. These community contributions can come in many forms beyond just writing code, from reporting an issue or suggesting a new feature to improving documentation or providing feedback on proposed changes.
If you've been looking to get involved with the Jekyll community, but didn't know, we've recently made it easier to contribute to Jekyll in two ways:
First, we've completely rewritten [the project's contributing guidelines](https://jekyllrb.com/docs/contributing/), outlining [the various ways you can contribute](https://jekyllrb.com/docs/contributing/#ways-to-contribute), and including better instructions for [submitting proposed changes via GitHub.com](https://jekyllrb.com/docs/contributing/#submitting-a-pull-request-via-githubcom) or for [submitting your first code improvement](https://jekyllrb.com/docs/contributing/#code-contributions). And if you have any feedback, we'd love to hear it! Simply click the "improve this page" button in the top right corner of the contributing documentation.
Second, this week, we created six community interest groups, we're calling [Jekyll affinity teams](https://teams.jekyllrb.com). If you're interested in a particular aspect of the project (or just want to learn more), you can join any one of these teams (or two, or three), to participate in discussions about potential bugs and proposed improvements. And the best part is there's no commitment. If you just want to listen, or if at any point you want to leave (or switch teams), that's totally fine. We won't say a thing. To learn more about the various affinity teams, or to join one (please do!), just head on over to [teams.jekyllrb.com](https://teams.jekyllrb.com/).
We hope these changes will make it easier for you to make your first (or second, or third) contribution to Jekyll today. Thanks for helping to make Jekyll awesome!

View File

@@ -5,20 +5,12 @@ title: Getting Help
Need help with Jekyll? Try these resources.
### [Upgrading](/docs/upgrading/)
### [Upgrading Documentation](/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.
### [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)
### [Google](https://google.com)
Add **jekyll** to almost any query, and you'll find just what you need.
@@ -27,7 +19,7 @@ Add **jekyll** to almost any query, and you'll find just what you need.
Jekyll Talk is our official Discourse forum. Here, users and contributors
can ask questions and discuss all aspects of Jekyll.
### [Jekyll on StackOverflow](https://stackoverflow.com/questions/tagged/jekyll)
### [Jekyll on StackOverflow](http://stackoverflow.com/questions/tagged/jekyll)
StackOverflow is a staple of any developer's diet. Check out the Jekyll tag
on StackOverflow for an answer to your question. Not there? Ask a new

View File

@@ -1,5 +1,6 @@
---
layout: default
title: Jekyll &bull; Simple, blog-aware, static sites
overview: true
---
@@ -21,7 +22,7 @@ overview: true
</div>
<div class="unit one-third">
<h2>Static</h2>
<p><a href="https://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://redcloth.org/textile">Textile</a>), <a href="https://github.com/Shopify/liquid/wiki">Liquid</a>, HTML <span class="amp">&amp;</span> CSS go in. Static sites come out ready for deployment.</p>
<p><a href="http://daringfireball.net/projects/markdown/">Markdown</a> (or <a href="http://redcloth.org/textile">Textile</a>), <a href="https://github.com/Shopify/liquid/wiki">Liquid</a>, HTML <span class="amp">&amp;</span> CSS go in. Static sites come out ready for deployment.</p>
<a href="/docs/templates/">Jekyll template guide &rarr;</a>
</div>
<div class="unit one-third">
@@ -79,7 +80,7 @@ overview: true
<div class="pane-content">
<h2 class="center-on-mobiles"><strong>Free hosting</strong> with GitHub Pages</h2>
<p>Sick of dealing with hosting companies? <a href="https://pages.github.com/">GitHub Pages</a> are <em>powered by Jekyll</em>, so you can easily deploy your site using GitHub for free&mdash;<a href="https://help.github.com/articles/about-supported-custom-domains/">custom domain name</a> and&nbsp;all.</p>
<a href="https://pages.github.com/">Learn more about GitHub Pages &rarr;</a>
<a href="http://pages.github.com/">Learn more about GitHub Pages &rarr;</a>
</div>
</div>
<div class="clear"></div>

View File

@@ -1 +1 @@
3.1.2
3.1.6

View File

@@ -1,20 +0,0 @@
---
layout: page
title: Roadmap
---
This is a high-level roadmap for Jekyll. It is a list of things we're
planning for each release. While plans are subject to change, this should
offer a bit of an overview for anyone interested in future features.
If you'd like to discuss any of the items, visit the link next to each
item and leave us a comment! We'd love to hear your thoughts.
- [v3.2](#v32)
- [v3.3](#v33)
## v3.2
For v3.2, we're interested in shipping:
1. **Gem-based themes.** This will allow users to ship layouts, includes, and sass (to start with) in a way that is more easily consumable and versionable. ([discuss]({{ site.repository }}/issues/4510))

View File

@@ -1,10 +1,3 @@
$stdout.puts "# -------------------------------------------------------------"
$stdout.puts "# SPECS AND TESTS ARE RUNNING WITH WARNINGS OFF."
$stdout.puts "# SEE: https://github.com/Shopify/liquid/issues/730"
$stdout.puts "# SEE: https://github.com/jekyll/jekyll/issues/4719"
$stdout.puts "# -------------------------------------------------------------"
$VERBOSE = nil
def jruby?
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
end
@@ -28,7 +21,7 @@ require 'minitest/autorun'
require 'minitest/reporters'
require 'minitest/profile'
require 'rspec/mocks'
require 'jekyll'
require_relative "../lib/jekyll.rb"
Jekyll.logger = Logger.new(StringIO.new)
@@ -65,8 +58,30 @@ module Minitest::Assertions
end
end
module DirectoryHelpers
def dest_dir(*subdirs)
test_dir('dest', *subdirs)
end
def source_dir(*subdirs)
test_dir('source', *subdirs)
end
def test_dir(*subdirs)
File.join(File.dirname(__FILE__), *subdirs)
end
end
class JekyllUnitTest < Minitest::Test
include ::RSpec::Mocks::ExampleMethods
include DirectoryHelpers
extend DirectoryHelpers
def mu_pp obj
s = obj.is_a?(Hash) ? JSON.pretty_generate(obj) : obj.inspect
s = s.encode Encoding.default_external if defined? Encoding
s
end
def mocks_expect(*args)
RSpec::Mocks::ExampleMethods::ExpectHost.instance_method(:expect).\
@@ -89,9 +104,12 @@ class JekyllUnitTest < Minitest::Test
Jekyll::Site.new(site_configuration(overrides))
end
def build_configs(overrides, base_hash = Jekyll::Configuration::DEFAULTS)
def default_configuration
Marshal.load(Marshal.dump(Jekyll::Configuration::DEFAULTS))
end
def build_configs(overrides, base_hash = default_configuration)
Utils.deep_merge_hashes(base_hash, overrides)
.fix_common_issues.backwards_compatibilize.add_default_collections
end
def site_configuration(overrides = {})
@@ -101,15 +119,10 @@ class JekyllUnitTest < Minitest::Test
}))
build_configs({
"source" => source_dir
}, full_overrides)
end
def dest_dir(*subdirs)
test_dir('dest', *subdirs)
end
def source_dir(*subdirs)
test_dir('source', *subdirs)
}, full_overrides).
fix_common_issues.
backwards_compatibilize.
add_default_collections
end
def clear_dest
@@ -117,10 +130,6 @@ class JekyllUnitTest < Minitest::Test
FileUtils.rm_rf(source_dir('.jekyll-metadata'))
end
def test_dir(*subdirs)
File.join(File.dirname(__FILE__), *subdirs)
end
def directory_with_contents(path)
FileUtils.rm_rf(path)
FileUtils.mkdir(path)

View File

@@ -1,5 +0,0 @@
---
title: "Collection#entries"
---
I have no file extension but I should still be a part of the collection.

View File

@@ -37,40 +37,6 @@ class TestCleaner < JekyllUnitTest
end
end
context "not-nested directory in keep_files and similary named directory not in keep_files" do
setup do
clear_dest
FileUtils.mkdir_p(dest_dir('.git/child_dir'))
FileUtils.mkdir_p(dest_dir('username.github.io'))
FileUtils.touch(File.join(dest_dir('.git'), 'index.html'))
FileUtils.touch(File.join(dest_dir('username.github.io'), 'index.html'))
@site = fixture_site
@site.keep_files = ['.git']
@cleaner = Cleaner.new(@site)
@cleaner.cleanup!
end
teardown do
FileUtils.rm_rf(dest_dir('.git'))
FileUtils.rm_rf(dest_dir('username.github.io'))
end
should "keep the file in the directory in keep_files" do
assert File.exist?(File.join(dest_dir('.git'), 'index.html'))
end
should "delete the file in the directory not in keep_files" do
assert !File.exist?(File.join(dest_dir('username.github.io'), 'index.html'))
end
should "delete the directory not in keep_files" do
assert !File.exist?(dest_dir('username.github.io'))
end
end
context "directory containing no files and non-empty directories" do
setup do
clear_dest

View File

@@ -126,7 +126,6 @@ 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

View File

@@ -68,11 +68,6 @@ class TestCommandsServe < JekyllUnitTest
]
end
should "use empty directory index list when show_dir_listing is true" do
opts = { "show_dir_listing" => true }
assert custom_opts(opts)[:DirectoryIndex].empty?
end
context "verbose" do
should "debug when verbose" do
assert_equal custom_opts({ "verbose" => true })[:Logger].level, 5
@@ -110,7 +105,7 @@ class TestCommandsServe < JekyllUnitTest
"ssl_key" => "bar"
})
assert result[:EnableSSL]
assert result[:SSLEnable]
assert_equal result[:SSLPrivateKey ], "c2"
assert_equal result[:SSLCertificate], "c1"
end

View File

@@ -1,7 +1,62 @@
require 'helper'
class TestConfiguration < JekyllUnitTest
@@defaults = Jekyll::Configuration::DEFAULTS.add_default_collections.freeze
@@test_config = {
"source" => new(nil).source_dir,
"destination" => dest_dir
}
context ".from" do
should "create a Configuration object" do
assert_instance_of Configuration, Configuration.from({})
end
should "merge input over defaults" do
result = Configuration.from({"source" => "blah"})
refute_equal result["source"], Configuration::DEFAULTS["source"]
assert_equal result["source"], "blah"
end
should "fix common mistakes" do
result = Configuration.from({"paginate" => 0})
assert_nil result["paginate"], "Expected 'paginate' to be corrected to 'nil', but was #{result["paginate"].inspect}"
end
should "add default collections" do
result = Configuration.from({})
assert_equal result["collections"], {"posts" => {"output" => true, "permalink" => "/:categories/:year/:month/:day/:title:output_ext"}}
end
should "NOT backwards-compatibilize" do
assert Configuration.from("watch" => true)["watch"], "Expected the 'watch' key to not be removed."
end
end
context "#add_default_collections" do
should "no-op if collections is nil" do
result = Configuration[{"collections" => nil}].add_default_collections
assert_nil result["collections"]
end
should "turn an array into a hash" do
result = Configuration[{"collections" => %w{methods}}].add_default_collections
assert_instance_of Hash, result["collections"]
assert_equal result["collections"], {"posts" => {"output" => true}, "methods" => {}}
end
should "only assign collections.posts.permalink if a permalink is specified" do
result = Configuration[{"permalink" => "pretty", "collections" => {}}].add_default_collections
assert_equal result["collections"], {"posts" => {"output" => true, "permalink" => "/:categories/:year/:month/:day/:title/"}}
result = Configuration[{"permalink" => nil, "collections" => {}}].add_default_collections
assert_equal result["collections"], {"posts" => {"output" => true}}
end
should "forces posts to output" do
result = Configuration[{"collections" => {"posts" => {"output" => false}}}].add_default_collections
assert_equal result["collections"]["posts"]["output"], true
end
end
context "#stringify_keys" do
setup do
@@ -154,27 +209,27 @@ class TestConfiguration < JekyllUnitTest
end
context "loading configuration" do
setup do
@path = File.join(Dir.pwd, '_config.yml')
@path = source_dir('_config.yml')
@user_config = File.join(Dir.pwd, "my_config_file.yml")
end
should "fire warning with no _config.yml" do
allow(SafeYAML).to receive(:load_file).with(@path) { raise SystemCallError, "No such file or directory - #{@path}" }
allow($stderr).to receive(:puts).with("Configuration file: none".yellow)
assert_equal @@defaults, Jekyll.configuration({})
assert_equal site_configuration, Jekyll.configuration(@@test_config)
end
should "load configuration as hash" do
allow(SafeYAML).to receive(:load_file).with(@path).and_return(Hash.new)
allow($stdout).to receive(:puts).with("Configuration file: #{@path}")
assert_equal @@defaults, Jekyll.configuration({})
assert_equal site_configuration, Jekyll.configuration(@@test_config)
end
should "fire warning with bad config" do
allow(SafeYAML).to receive(:load_file).with(@path).and_return(Array.new)
allow($stderr).to receive(:puts).and_return(("WARNING: ".rjust(20) + "Error reading configuration. Using defaults (and options).").yellow)
allow($stderr).to receive(:puts).and_return("Configuration file: (INVALID) #{@path}".yellow)
assert_equal @@defaults, Jekyll.configuration({})
assert_equal site_configuration, Jekyll.configuration(@@test_config)
end
should "fire warning when user-specified config file isn't there" do
@@ -193,8 +248,8 @@ class TestConfiguration < JekyllUnitTest
context "loading config from external file" do
setup do
@paths = {
:default => File.join(Dir.pwd, '_config.yml'),
:other => File.join(Dir.pwd, '_config.live.yml'),
:default => source_dir('_config.yml'),
:other => source_dir('_config.live.yml'),
:toml => source_dir('_config.dev.toml'),
:empty => ""
}
@@ -203,24 +258,31 @@ class TestConfiguration < JekyllUnitTest
should "load default plus posts config if no config_file is set" do
allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({})
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}")
assert_equal @@defaults, Jekyll.configuration({})
assert_equal site_configuration, Jekyll.configuration(@@test_config)
end
should "load different config if specified" do
allow(SafeYAML).to receive(:load_file).with(@paths[:other]).and_return({"baseurl" => "http://wahoo.dev"})
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:other]}")
assert_equal Utils.deep_merge_hashes(@@defaults, { "baseurl" => "http://wahoo.dev" }), Jekyll.configuration({ "config" => @paths[:other] })
Jekyll.configuration({ "config" => @paths[:other] })
assert_equal \
site_configuration({ "baseurl" => "http://wahoo.dev" }),
Jekyll.configuration(@@test_config.merge({ "config" => @paths[:other] }))
end
should "load default config if path passed is empty" do
allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({})
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}")
assert_equal @@defaults, Jekyll.configuration({ "config" => @paths[:empty] })
assert_equal \
site_configuration,
Jekyll.configuration(@@test_config.merge({ "config" => [@paths[:empty]] }))
end
should "successfully load a TOML file" do
Jekyll.logger.log_level = :warn
assert_equal @@defaults.clone.merge({ "baseurl" => "/you-beautiful-blog-you", "title" => "My magnificent site, wut" }), Jekyll.configuration({ "config" => [@paths[:toml]] })
assert_equal \
site_configuration({ "baseurl" => "/you-beautiful-blog-you", "title" => "My magnificent site, wut" }),
Jekyll.configuration(@@test_config.merge({ "config" => [@paths[:toml]] }))
Jekyll.logger.log_level = :info
end
@@ -233,7 +295,9 @@ class TestConfiguration < JekyllUnitTest
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}")
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:other]}")
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:toml]}")
assert_equal @@defaults, Jekyll.configuration({ "config" => [@paths[:default], @paths[:other], @paths[:toml]] })
assert_equal \
site_configuration,
Jekyll.configuration(@@test_config.merge({ "config" => [@paths[:default], @paths[:other], @paths[:toml]] }))
end
should "load multiple config files and last config should win" do
@@ -241,7 +305,63 @@ class TestConfiguration < JekyllUnitTest
allow(SafeYAML).to receive(:load_file).with(@paths[:other]).and_return({"baseurl" => "http://wahoo.dev"})
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}")
allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:other]}")
assert_equal Utils.deep_merge_hashes(@@defaults, { "baseurl" => "http://wahoo.dev" }), Jekyll.configuration({ "config" => [@paths[:default], @paths[:other]] })
assert_equal \
site_configuration({ "baseurl" => "http://wahoo.dev" }),
Jekyll.configuration(@@test_config.merge({ "config" => [@paths[:default], @paths[:other]] }))
end
end
context "#add_default_collections" do
should "not do anything if collections is nil" do
conf = Configuration[default_configuration].tap {|c| c['collections'] = nil }
assert_equal conf.add_default_collections, conf
assert_nil conf.add_default_collections['collections']
end
should "converts collections to a hash if an array" do
conf = Configuration[default_configuration].tap {|c| c['collections'] = ['docs'] }
assert_equal conf.add_default_collections, conf.merge({
"collections" => {
"docs" => {},
"posts" => {
"output" => true,
"permalink" => "/:categories/:year/:month/:day/:title:output_ext"
}}})
end
should "force collections.posts.output = true" do
conf = Configuration[default_configuration].tap {|c| c['collections'] = {'posts' => {'output' => false}} }
assert_equal conf.add_default_collections, conf.merge({
"collections" => {
"posts" => {
"output" => true,
"permalink" => "/:categories/:year/:month/:day/:title:output_ext"
}}})
end
should "set collections.posts.permalink if it's not set" do
conf = Configuration[default_configuration]
assert_equal conf.add_default_collections, conf.merge({
"collections" => {
"posts" => {
"output" => true,
"permalink" => "/:categories/:year/:month/:day/:title:output_ext"
}}})
end
should "leave collections.posts.permalink alone if it is set" do
posts_permalink = "/:year/:title/"
conf = Configuration[default_configuration].tap do |c|
c['collections'] = {
"posts" => { "permalink" => posts_permalink }
}
end
assert_equal conf.add_default_collections, conf.merge({
"collections" => {
"posts" => {
"output" => true,
"permalink" => posts_permalink
}}})
end
end
end

Some files were not shown because too many files have changed in this diff Show More