mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Compare commits
269 Commits
slash-eq-h
...
roadmap
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb04d0db3b | ||
|
|
f9411bd362 | ||
|
|
4528772e20 | ||
|
|
5457fa16f6 | ||
|
|
a473b45e35 | ||
|
|
41c3dd4cde | ||
|
|
071e775a55 | ||
|
|
cb6e2574ce | ||
|
|
413783c4e8 | ||
|
|
daf638b600 | ||
|
|
a449512912 | ||
|
|
41e2994868 | ||
|
|
51f79a4387 | ||
|
|
6422477c5e | ||
|
|
e801d55ddf | ||
|
|
ade2847301 | ||
|
|
7040448b75 | ||
|
|
d5b26c94d2 | ||
|
|
eadba642ce | ||
|
|
387c40f667 | ||
|
|
2bd3815b42 | ||
|
|
df2a92cb39 | ||
|
|
a224491d20 | ||
|
|
7861f12727 | ||
|
|
6ee728efcb | ||
|
|
ba9a28474f | ||
|
|
6c9200252a | ||
|
|
4b471fe9fb | ||
|
|
f80321ecac | ||
|
|
06ab708edf | ||
|
|
f2aa15555b | ||
|
|
afa89d68f8 | ||
|
|
9474c370dc | ||
|
|
a04df2f440 | ||
|
|
d213981a24 | ||
|
|
7cdc8394aa | ||
|
|
f16c5d0e65 | ||
|
|
1ab0ed3664 | ||
|
|
9be387ef6f | ||
|
|
9234fa7510 | ||
|
|
7a4817e55a | ||
|
|
f0e9b378f6 | ||
|
|
da4a664290 | ||
|
|
9fc4a85806 | ||
|
|
59d1a122c6 | ||
|
|
0f2df6c7b3 | ||
|
|
c7d4386b63 | ||
|
|
54fcc97725 | ||
|
|
5f97f928de | ||
|
|
c27c669796 | ||
|
|
c6564d352b | ||
|
|
87d0f03f5c | ||
|
|
7695ba6eb4 | ||
|
|
01d48320fd | ||
|
|
22d9312eaf | ||
|
|
da35e134f1 | ||
|
|
09f9f193d8 | ||
|
|
0c172f6463 | ||
|
|
4ce50e3936 | ||
|
|
007b7d45dc | ||
|
|
9b60df8883 | ||
|
|
84b7d9b3ac | ||
|
|
b5e459430b | ||
|
|
d2c754c0fe | ||
|
|
8786163f35 | ||
|
|
e1fe161071 | ||
|
|
e873934d60 | ||
|
|
f542d817b0 | ||
|
|
4cb6b249f1 | ||
|
|
27d617a319 | ||
|
|
aeecbd741f | ||
|
|
b06af5a44f | ||
|
|
62669d9229 | ||
|
|
0a2c8bb26a | ||
|
|
bbb76a39a2 | ||
|
|
2736be44c5 | ||
|
|
848b1358a1 | ||
|
|
526ded00e9 | ||
|
|
983cd60a8d | ||
|
|
a54cedbb72 | ||
|
|
bd0cdcd4cb | ||
|
|
c795acd09f | ||
|
|
46c08e5dc1 | ||
|
|
4618a2a8b5 | ||
|
|
c28a17d71f | ||
|
|
a81bc9773f | ||
|
|
68892ab693 | ||
|
|
af47b3c1a7 | ||
|
|
0c73a6ded9 | ||
|
|
4b32bd2b13 | ||
|
|
f79f9d60a9 | ||
|
|
ac9a72482d | ||
|
|
b9859489b0 | ||
|
|
5930bbfac1 | ||
|
|
4883a24363 | ||
|
|
97efa0f0ce | ||
|
|
329878c45f | ||
|
|
bb1bd671b7 | ||
|
|
c006979160 | ||
|
|
a882c88081 | ||
|
|
3014444b0e | ||
|
|
ebe46f1ddc | ||
|
|
417b5a3b2e | ||
|
|
e33574b391 | ||
|
|
204e3074c9 | ||
|
|
15e7c30cc7 | ||
|
|
e92a46e156 | ||
|
|
2ea3bc53d3 | ||
|
|
c206df3401 | ||
|
|
d4c1d97cb3 | ||
|
|
4948b5a3b3 | ||
|
|
64d5e3dfd3 | ||
|
|
79f8210fff | ||
|
|
52eb60e171 | ||
|
|
8c9ebd2674 | ||
|
|
1768bcc489 | ||
|
|
86e4fa9a35 | ||
|
|
b086a3b423 | ||
|
|
1c59be1494 | ||
|
|
c759771dc7 | ||
|
|
238341ac8a | ||
|
|
21847980e3 | ||
|
|
b4ca9a56fe | ||
|
|
3403a76ec8 | ||
|
|
61e549d317 | ||
|
|
2240d52338 | ||
|
|
3acf4beb81 | ||
|
|
0f8a3b2971 | ||
|
|
d2fd910828 | ||
|
|
a068bfb8ee | ||
|
|
a3577d953d | ||
|
|
40a5e5c60c | ||
|
|
9e57eb1858 | ||
|
|
0f50dd1bb7 | ||
|
|
a93c3eadd1 | ||
|
|
9e0ed00a59 | ||
|
|
a1835c0a31 | ||
|
|
c49d1fc1bd | ||
|
|
3129372d12 | ||
|
|
faf06d1969 | ||
|
|
d912f3a456 | ||
|
|
9520d9bbf9 | ||
|
|
ce3ea138ce | ||
|
|
85685a8981 | ||
|
|
13912482ad | ||
|
|
3213ea70e5 | ||
|
|
24da7f8883 | ||
|
|
71d510a79c | ||
|
|
46bdaa49dc | ||
|
|
b3c6714b12 | ||
|
|
37cc45239d | ||
|
|
456007aab7 | ||
|
|
b8b5cb47ec | ||
|
|
d8bb9ae77b | ||
|
|
26782e246b | ||
|
|
664206608d | ||
|
|
90e83e0636 | ||
|
|
09b9db259c | ||
|
|
a416802a89 | ||
|
|
03f57a898b | ||
|
|
ff91463c43 | ||
|
|
e130a0841f | ||
|
|
55edf76590 | ||
|
|
7b80cb78bd | ||
|
|
6262a59be8 | ||
|
|
1bc9e0ed63 | ||
|
|
b80a0cb5ce | ||
|
|
301fe59dc6 | ||
|
|
1853f6a210 | ||
|
|
0654e2f65e | ||
|
|
059d7d2997 | ||
|
|
81c88d6833 | ||
|
|
11d2d78cd9 | ||
|
|
3954cb4dd4 | ||
|
|
25cf188caa | ||
|
|
de8f67c4a2 | ||
|
|
7e21d2a98f | ||
|
|
928faed7c7 | ||
|
|
67904e849d | ||
|
|
377d212ecc | ||
|
|
f274179d9b | ||
|
|
b0c730d278 | ||
|
|
f66f791668 | ||
|
|
14e9ec2bbb | ||
|
|
39a4dc6fb7 | ||
|
|
c16a2f4d6a | ||
|
|
390fc11239 | ||
|
|
cddea273a9 | ||
|
|
38d2445430 | ||
|
|
c0f0efc1cd | ||
|
|
f2c428bedc | ||
|
|
9b889217fa | ||
|
|
c6a85ff359 | ||
|
|
b638c94625 | ||
|
|
8e81dd69ec | ||
|
|
0114c51c6e | ||
|
|
ac704b9763 | ||
|
|
ae228705b2 | ||
|
|
aa1b565228 | ||
|
|
0618ae8a2e | ||
|
|
dafb25cbfe | ||
|
|
43873bb881 | ||
|
|
c6790bd8c9 | ||
|
|
61567f430e | ||
|
|
2a2326aea3 | ||
|
|
e3cfe13ef5 | ||
|
|
0e155adef6 | ||
|
|
1367123d5b | ||
|
|
d51c1c471a | ||
|
|
268f8f41ed | ||
|
|
b7d4f92764 | ||
|
|
d4cf0dbb0c | ||
|
|
502be39e9b | ||
|
|
43f4be7752 | ||
|
|
7665488e39 | ||
|
|
455e12a1a4 | ||
|
|
87a1a1426f | ||
|
|
9d3a5be579 | ||
|
|
b2eb00b902 | ||
|
|
cd633ea188 | ||
|
|
579733dbb5 | ||
|
|
fa1eb68941 | ||
|
|
e4a3712f30 | ||
|
|
7728d7bb86 | ||
|
|
d67cd63723 | ||
|
|
3fbca47b1a | ||
|
|
f5f8548eb8 | ||
|
|
6245ddb14d | ||
|
|
d14600152f | ||
|
|
9c1a897d60 | ||
|
|
58a74a166d | ||
|
|
cfb4a848b4 | ||
|
|
b2e6211f2f | ||
|
|
9f93b2595d | ||
|
|
14cccbfdc2 | ||
|
|
98b5ca3850 | ||
|
|
70ed98fadd | ||
|
|
279d24a8f5 | ||
|
|
7542ab51b7 | ||
|
|
64ad293b89 | ||
|
|
03a7e22b7e | ||
|
|
b6a0b9e548 | ||
|
|
9e67c0a9b7 | ||
|
|
107c95cf5f | ||
|
|
04ff228660 | ||
|
|
8537e36936 | ||
|
|
7bffb39244 | ||
|
|
0fd3c2d64c | ||
|
|
3c7c645505 | ||
|
|
d1c08d85d2 | ||
|
|
f05e3f340e | ||
|
|
e9ecb93dec | ||
|
|
fa4d327ddb | ||
|
|
18126d0ebd | ||
|
|
8d7e329a6e | ||
|
|
391960b55f | ||
|
|
5d66a12ed4 | ||
|
|
05d753f4e0 | ||
|
|
32c5ac35dd | ||
|
|
a47b913273 | ||
|
|
d929242e2b | ||
|
|
551f8b751f | ||
|
|
d387fd0baa | ||
|
|
0e89a37eaf | ||
|
|
246e65914f | ||
|
|
3373eb6525 | ||
|
|
1eb626b1df | ||
|
|
3b60237cb1 | ||
|
|
e0b8539670 |
122
.github/CONTRIBUTING.markdown
vendored
Normal file
122
.github/CONTRIBUTING.markdown
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
# 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!
|
||||
@@ -9,7 +9,6 @@ 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
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Contributor Code of Conduct
|
||||
# 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
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
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!
|
||||
9
Gemfile
9
Gemfile
@@ -1,7 +1,7 @@
|
||||
source "https://rubygems.org"
|
||||
gemspec :name => "jekyll"
|
||||
|
||||
gem "rake", "~> 10.1"
|
||||
gem "rake", "~> 11.0"
|
||||
group :development do
|
||||
gem "launchy", "~> 2.3"
|
||||
gem "rubocop", :branch => :master, :github => "bbatsov/rubocop"
|
||||
@@ -55,6 +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-gist", "~> 1.0"
|
||||
gem "jekyll-feed", "~> 0.1.3"
|
||||
gem "jekyll-coffeescript", "~> 1.0"
|
||||
@@ -79,5 +80,9 @@ group :site do
|
||||
if ENV["PROOF"]
|
||||
gem "html-proofer", "~> 2.0"
|
||||
end
|
||||
gem "jemoji"
|
||||
|
||||
gem "jemoji", "0.5.1"
|
||||
gem "jekyll-sitemap"
|
||||
gem "jekyll-seo-tag", "~> 1.1"
|
||||
gem "jekyll-avatar"
|
||||
end
|
||||
|
||||
101
History.markdown
101
History.markdown
@@ -1,27 +1,96 @@
|
||||
## HEAD
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* require at least cucumber version 2.1.0 (#4514)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix #4427: Make our @config hash symbol accessible. (#4428)
|
||||
* `Jekyll.sanitized_path`: sanitizing a questionable path should handle tildes (#4492)
|
||||
* Fix titleize so already capitalized words are not dropped (#4525)
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Include .rubocop.yml in Gem (#4437)
|
||||
* LiquidRenderer#parse: parse with line numbers. (#4452)
|
||||
* add consistency to the deprecation message (#4505)
|
||||
* 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)
|
||||
|
||||
### 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)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* 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)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* 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.2 / 2016-02-19
|
||||
|
||||
### Minor Enhancements
|
||||
|
||||
* Include `.rubocop.yml` in Gem (#4437)
|
||||
* `LiquidRenderer#parse`: parse with line numbers. (#4452)
|
||||
* Add consistency to the no-subcommand deprecation message (#4505)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Fix syntax highlighting in kramdown by making `@config` accessible in the Markdown converter. (#4428)
|
||||
* `Jekyll.sanitized_path`: sanitizing a questionable path should handle tildes (#4492)
|
||||
* Fix `titleize` so already capitalized words are not dropped (#4525)
|
||||
* Permalinks which end in a slash should always output HTML (#4546)
|
||||
|
||||
### Development Fixes
|
||||
|
||||
* Require at least cucumber version 2.1.0 (#4514)
|
||||
|
||||
### Site Enhancements
|
||||
|
||||
* Add jekyll-toc plugin (#4429)
|
||||
* Docs: Quickstart - added documentation about the `--force` option (#4410)
|
||||
* Fix broken links to the Code of Conduct (#4436)
|
||||
* upgrade notes: mention trailing slash in permalink; fixes #4440 (#4455)
|
||||
* Upgrade notes: mention trailing slash in permalink; fixes #4440 (#4455)
|
||||
* Add hooks to the plugin categories toc (#4463)
|
||||
* [add note] Jekyll 3 requires newer version of Ruby. (#4461)
|
||||
* Fix typo in upgrading docs (#4473)
|
||||
@@ -958,7 +1027,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)
|
||||
@@ -1824,7 +1893,7 @@
|
||||
|
||||
* Bug Fixes
|
||||
* Fix pagination % 0 bug (#78)
|
||||
* Ensure all posts are processed first (#71) ## NOTE
|
||||
* Ensure all posts are processed first (#71)
|
||||
* 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# [Jekyll](http://jekyllrb.com/)
|
||||
# [Jekyll](https://jekyllrb.com/)
|
||||
|
||||
[][ruby-gems]
|
||||
[][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](http://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](https://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: http://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
|
||||
See: https://jekyllrb.com/docs/troubleshooting/#jekyll-amp-mac-os-x-1011
|
||||
|
||||
## Getting Started
|
||||
|
||||
* [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/)
|
||||
* [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/)
|
||||
* Take a gander at some existing [Sites](https://wiki.github.com/jekyll/jekyll/sites)
|
||||
* Fork and [Contribute](http://jekyllrb.com/docs/contributing/) your own modifications
|
||||
* [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://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, @envygeeks, or @mattr-) know
|
||||
these terms, please let a maintainer ([@parkr](https://github.com/parkr), [@envygeeks](https://github.com/envygeeks), or [@mattr-](https://github.com/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](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
|
||||
* 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
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE).
|
||||
See the [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE) file.
|
||||
|
||||
28
Rakefile
28
Rakefile
@@ -87,6 +87,34 @@ 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
|
||||
|
||||
51
benchmark/regexp-vs-include.rb
Normal file
51
benchmark/regexp-vs-include.rb
Normal file
@@ -0,0 +1,51 @@
|
||||
#!/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
|
||||
@@ -186,3 +186,20 @@ 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"
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# coding: utf-8
|
||||
lib = File.expand_path('../lib', __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require 'jekyll/version'
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = 'jekyll-docs'
|
||||
spec.version = Jekyll::VERSION
|
||||
spec.authors = ['Parker Moore']
|
||||
spec.email = ['parkrmoore@gmail.com']
|
||||
spec.summary = %q{Offline usage documentation for Jekyll.}
|
||||
spec.homepage = 'http://jekyllrb.com'
|
||||
spec.license = 'MIT'
|
||||
|
||||
spec.files = `git ls-files -z`.split("\x0").grep(%r{^site/})
|
||||
spec.require_paths = ['lib']
|
||||
|
||||
spec.add_dependency 'jekyll', Jekyll::VERSION
|
||||
|
||||
spec.add_development_dependency 'bundler', '~> 1.7'
|
||||
spec.add_development_dependency 'rake', '~> 10.0'
|
||||
end
|
||||
@@ -95,11 +95,12 @@ module Jekyll
|
||||
# Private: Creates a regular expression from the config's keep_files array
|
||||
#
|
||||
# Examples
|
||||
# ['.git','.svn'] creates the following regex: /\/(\.git|\/.svn)/
|
||||
# ['.git','.svn'] with site.dest "/myblog/_site" creates
|
||||
# the following regex: /\A\/myblog\/_site\/(\.git|\/.svn)/
|
||||
#
|
||||
# Returns the regular expression
|
||||
def keep_file_regex
|
||||
Regexp.union(site.keep_files)
|
||||
/\A#{Regexp.quote(site.dest)}\/(#{Regexp.union(site.keep_files).source})/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -19,21 +19,19 @@ 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')
|
||||
|
||||
if File.directory? destination
|
||||
Jekyll.logger.info "Cleaning #{destination}..."
|
||||
FileUtils.rm_rf(destination)
|
||||
Jekyll.logger.info "", "done."
|
||||
else
|
||||
Jekyll.logger.info "Nothing to do for #{destination}."
|
||||
end
|
||||
remove(destination, checker_func: :directory?)
|
||||
remove(metadata_file, checker_func: :file?)
|
||||
remove(sass_cache, checker_func: :directory?)
|
||||
end
|
||||
|
||||
if File.file? metadata_file
|
||||
Jekyll.logger.info "Removing #{metadata_file}..."
|
||||
FileUtils.rm_rf(metadata_file)
|
||||
Jekyll.logger.info "", "done."
|
||||
def remove(filename, checker_func: :file?)
|
||||
if File.public_send(checker_func, filename)
|
||||
Jekyll.logger.info "Cleaner:", "Removing #{filename}..."
|
||||
FileUtils.rm_rf(filename)
|
||||
else
|
||||
Jekyll.logger.info "Nothing to do for #{metadata_file}."
|
||||
Jekyll.logger.info "Cleaner:", "Nothing to do for #{filename}."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -8,7 +8,7 @@ module Jekyll
|
||||
c.description 'Search site and print specific deprecation warnings'
|
||||
c.alias(:hyde)
|
||||
|
||||
c.option '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
|
||||
c.option 'config', '--config CONFIG_FILE[,CONFIG_FILE2,...]', Array, 'Custom configuration file'
|
||||
|
||||
c.action do |_, options|
|
||||
Jekyll::Commands::Doctor.process(options)
|
||||
|
||||
@@ -35,6 +35,10 @@ 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}."
|
||||
@@ -59,6 +63,31 @@ 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?
|
||||
|
||||
@@ -10,6 +10,8 @@ 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."]
|
||||
}
|
||||
@@ -91,6 +93,8 @@ module Jekyll
|
||||
)
|
||||
}
|
||||
|
||||
opts[:DirectoryIndex] = [] if opts[:JekyllOptions]['show_dir_listing']
|
||||
|
||||
enable_ssl(opts)
|
||||
enable_logging(opts)
|
||||
opts
|
||||
@@ -123,15 +127,12 @@ module Jekyll
|
||||
|
||||
private
|
||||
def launch_browser(server, opts)
|
||||
command =
|
||||
if Utils::Platforms.windows?
|
||||
"start"
|
||||
elsif Utils::Platforms.osx?
|
||||
"open"
|
||||
else
|
||||
"xdg-open"
|
||||
end
|
||||
system command, server_address(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."
|
||||
end
|
||||
|
||||
# Keep in our area with a thread or detach the server as requested
|
||||
|
||||
@@ -44,6 +44,7 @@ module Jekyll
|
||||
'port' => '4000',
|
||||
'host' => '127.0.0.1',
|
||||
'baseurl' => '',
|
||||
'show_dir_listing' => false,
|
||||
|
||||
# Output Configuration
|
||||
'permalink' => 'date',
|
||||
@@ -148,7 +149,7 @@ module Jekyll
|
||||
Jekyll.logger.info "Configuration file:", file
|
||||
next_config
|
||||
rescue SystemCallError
|
||||
if @default_config_file
|
||||
if @default_config_file ||= nil
|
||||
Jekyll.logger.warn "Configuration file:", "none"
|
||||
{}
|
||||
else
|
||||
|
||||
@@ -8,7 +8,9 @@ module Jekyll
|
||||
#
|
||||
# Returns the String prefix.
|
||||
def self.highlighter_prefix(highlighter_prefix = nil)
|
||||
@highlighter_prefix = highlighter_prefix if highlighter_prefix
|
||||
if !defined?(@highlighter_prefix) || !highlighter_prefix.nil?
|
||||
@highlighter_prefix = highlighter_prefix
|
||||
end
|
||||
@highlighter_prefix
|
||||
end
|
||||
|
||||
@@ -20,7 +22,9 @@ module Jekyll
|
||||
#
|
||||
# Returns the String suffix.
|
||||
def self.highlighter_suffix(highlighter_suffix = nil)
|
||||
@highlighter_suffix = highlighter_suffix if highlighter_suffix
|
||||
if !defined?(@highlighter_suffix) || !highlighter_suffix.nil?
|
||||
@highlighter_suffix = highlighter_suffix
|
||||
end
|
||||
@highlighter_suffix
|
||||
end
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ module Jekyll
|
||||
safe true
|
||||
|
||||
def setup
|
||||
return if @setup
|
||||
return if @setup ||= false
|
||||
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"]
|
||||
|
||||
@@ -18,6 +18,7 @@ module Jekyll
|
||||
Jekyll::External.require_with_graceful_fail "kramdown"
|
||||
@main_fallback_highlighter = config["highlighter"] || "rouge"
|
||||
@config = config["kramdown"] || {}
|
||||
@highlighter = nil
|
||||
setup
|
||||
end
|
||||
|
||||
|
||||
@@ -68,7 +68,11 @@ module Jekyll
|
||||
end
|
||||
|
||||
def date
|
||||
data['date'] ||= site.time
|
||||
data['date'] ||= (draft? ? source_file_mtime : site.time)
|
||||
end
|
||||
|
||||
def source_file_mtime
|
||||
@source_file_mtime ||= File.mtime(path)
|
||||
end
|
||||
|
||||
# Returns whether the document is a draft. This is only the case if
|
||||
|
||||
@@ -20,6 +20,13 @@ 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
|
||||
end
|
||||
|
||||
private
|
||||
def_delegator :@obj, :data, :fallback_data
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module Jekyll
|
||||
class EntryFilter
|
||||
SPECIAL_LEADING_CHARACTERS = ['.', '_', '#'].freeze
|
||||
SPECIAL_LEADING_CHARACTERS = ['.', '_', '#', '~'].freeze
|
||||
|
||||
attr_reader :site
|
||||
|
||||
|
||||
@@ -6,5 +6,9 @@ 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
|
||||
|
||||
@@ -15,11 +15,11 @@ module Jekyll
|
||||
converter.convert(input)
|
||||
end
|
||||
|
||||
# Convert a Markdown string into HTML output.
|
||||
# Convert quotes into smart quotes.
|
||||
#
|
||||
# input - The Markdown String to convert.
|
||||
# input - The String to convert.
|
||||
#
|
||||
# Returns the HTML formatted String.
|
||||
# Returns the smart-quotified 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)
|
||||
CGI.escapeHTML(input.to_s)
|
||||
input.to_s.encode(:xml => :attr).gsub(/\A"|"\Z/, "")
|
||||
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 }
|
||||
memo << { "name" => i.first, "items" => i.last, "size" => i.last.size }
|
||||
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| item_property(object, property).to_s == value.to_s }
|
||||
input.select { |object| Array(item_property(object, property)).map(&:to_s).include?(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)
|
||||
CGI.escapeHTML(input.inspect)
|
||||
xml_escape(input.inspect)
|
||||
end
|
||||
|
||||
private
|
||||
def time(input)
|
||||
case input
|
||||
when Time
|
||||
input
|
||||
input.clone
|
||||
when Date
|
||||
input.to_time
|
||||
when String
|
||||
|
||||
@@ -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 |path|
|
||||
if path.to_s == scope_path.to_s
|
||||
Pathname.new(sanitize_path(path)).ascend do |ascended_path|
|
||||
if ascended_path.to_s == scope_path.to_s
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -12,6 +12,7 @@ module Jekyll
|
||||
# initial empty hooks
|
||||
@registry = {
|
||||
:site => {
|
||||
:after_init => [],
|
||||
:after_reset => [],
|
||||
:post_read => [],
|
||||
:pre_render => [],
|
||||
|
||||
@@ -60,7 +60,7 @@ module Jekyll
|
||||
#
|
||||
# Returns the safety Boolean.
|
||||
def self.safe(safe = nil)
|
||||
if safe
|
||||
if !defined?(@safe) || !safe.nil?
|
||||
@safe = safe
|
||||
end
|
||||
@safe || false
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -35,7 +35,11 @@ module Jekyll
|
||||
read_content(dir, magic_dir, matcher).tap do |docs|
|
||||
docs.each(&:read)
|
||||
end.select do |doc|
|
||||
site.publisher.publish?(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
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
module Jekyll
|
||||
class Regenerator
|
||||
attr_reader :site, :metadata, :cache
|
||||
attr_accessor :disabled
|
||||
private :disabled, :disabled=
|
||||
|
||||
def initialize(site)
|
||||
@site = site
|
||||
@@ -115,7 +117,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
|
||||
@@ -144,8 +146,8 @@ module Jekyll
|
||||
#
|
||||
# Returns a Boolean (true for disabled, false for enabled).
|
||||
def disabled?
|
||||
@disabled = !site.incremental? if @disabled.nil?
|
||||
@disabled
|
||||
self.disabled = !site.incremental? if disabled.nil?
|
||||
disabled
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
@@ -40,6 +40,8 @@ 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)
|
||||
|
||||
@@ -17,6 +17,31 @@ 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
|
||||
@@ -24,17 +49,6 @@ 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
|
||||
|
||||
@@ -43,10 +57,7 @@ module Jekyll
|
||||
|
||||
self.permalink_style = config['permalink'].to_sym
|
||||
|
||||
Jekyll.sites << self
|
||||
|
||||
reset
|
||||
setup
|
||||
@config
|
||||
end
|
||||
|
||||
# Public: Read, process, and write this Site to output.
|
||||
|
||||
@@ -80,7 +80,11 @@ module Jekyll
|
||||
|
||||
FileUtils.mkdir_p(File.dirname(dest_path))
|
||||
FileUtils.rm(dest_path) if File.exist?(dest_path)
|
||||
FileUtils.cp(path, dest_path)
|
||||
if @site.safe || Jekyll.env == "production"
|
||||
FileUtils.cp(path, dest_path)
|
||||
else
|
||||
FileUtils.copy_entry(path, dest_path)
|
||||
end
|
||||
File.utime(@@mtimes[path], @@mtimes[path], dest_path)
|
||||
|
||||
true
|
||||
|
||||
26
lib/jekyll/tags/link.rb
Normal file
26
lib/jekyll/tags/link.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
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)
|
||||
@@ -7,22 +7,30 @@ module Jekyll
|
||||
|
||||
def initialize(name)
|
||||
@name = name
|
||||
|
||||
all, @path, @date, @slug = *name.sub(/^\//, "").match(MATCHER)
|
||||
raise ArgumentError.new("'#{name}' does not contain valid date and/or title.") unless all
|
||||
unless all
|
||||
raise Jekyll::Errors::InvalidPostNameError,
|
||||
"'#{name}' does not contain valid date and/or title."
|
||||
end
|
||||
|
||||
@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) &&
|
||||
date.year == other.date.year &&
|
||||
date.month == other.date.month &&
|
||||
date.day == other.date.day
|
||||
post_date.year == other.date.year &&
|
||||
post_date.month == other.date.month &&
|
||||
post_date.day == other.date.day
|
||||
end
|
||||
|
||||
private
|
||||
@@ -47,11 +55,13 @@ module Jekyll
|
||||
@orig_post = post.strip
|
||||
begin
|
||||
@post = PostComparer.new(@orig_post)
|
||||
rescue
|
||||
raise ArgumentError.new <<-eos
|
||||
rescue => e
|
||||
raise Jekyll::Errors::PostURLError, <<-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
|
||||
@@ -75,7 +85,7 @@ eos
|
||||
return p.url
|
||||
end
|
||||
|
||||
raise ArgumentError.new <<-eos
|
||||
raise Jekyll::Errors::PostURLError, <<-eos
|
||||
Could not find post "#{@orig_post}" in tag 'post_url'.
|
||||
|
||||
Make sure the post exists and the name is correct.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
module Jekyll
|
||||
module Utils
|
||||
extend self
|
||||
@@ -126,7 +127,7 @@ module Jekyll
|
||||
def parse_date(input, msg = "Input could not be parsed.")
|
||||
Time.parse(input).localtime
|
||||
rescue ArgumentError
|
||||
raise Errors::FatalException.new("Invalid date '#{input}': " + msg)
|
||||
raise Errors::InvalidDateError, "Invalid date '#{input}': #{msg}"
|
||||
end
|
||||
|
||||
# Determines whether a given file has
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Jekyll
|
||||
VERSION = '3.1.1'
|
||||
VERSION = '3.1.2'
|
||||
end
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
# 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 need to edit after that.
|
||||
# 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.
|
||||
# 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:"
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
<h2 class="footer-heading">{{ site.title }}</h2>
|
||||
<h2 class="footer-heading">{{ site.title | escape }}</h2>
|
||||
|
||||
<div class="footer-col-wrapper">
|
||||
<div class="footer-col footer-col-1">
|
||||
<ul class="contact-list">
|
||||
<li>{{ site.title }}</li>
|
||||
<li>{{ site.title | escape }}</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 }}</p>
|
||||
<p>{{ site.description | escape }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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 }}{% endif %}">
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description | escape }}{% 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 }}" href="{{ "/feed.xml" | 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 }}">
|
||||
</head>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<header class="site-header">
|
||||
<header class="site-header" role="banner">
|
||||
|
||||
<div class="wrapper">
|
||||
|
||||
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title }}</a>
|
||||
<a class="site-title" href="{{ site.baseurl }}/">{{ site.title | escape }}</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 }}</a>
|
||||
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title | escape }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
{% include header.html %}
|
||||
|
||||
<div class="page-content">
|
||||
<main class="page-content" aria-label="Content">
|
||||
<div class="wrapper">
|
||||
{{ content }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% include footer.html %}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ layout: default
|
||||
<article class="post">
|
||||
|
||||
<header class="post-header">
|
||||
<h1 class="post-title">{{ page.title }}</h1>
|
||||
<h1 class="post-title">{{ page.title | escape }}</h1>
|
||||
</header>
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
@@ -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 }}</h1>
|
||||
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</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>
|
||||
|
||||
|
||||
@@ -177,13 +177,10 @@ pre {
|
||||
/**
|
||||
* Clearfix
|
||||
*/
|
||||
%clearfix {
|
||||
|
||||
&:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
%clearfix:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
|
||||
@@ -191,16 +188,13 @@ pre {
|
||||
/**
|
||||
* Icons
|
||||
*/
|
||||
.icon {
|
||||
.icon > svg {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
|
||||
> svg {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
vertical-align: middle;
|
||||
|
||||
path {
|
||||
fill: $grey-color;
|
||||
}
|
||||
path {
|
||||
fill: $grey-color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 }}</a>
|
||||
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title | escape }}</a>
|
||||
</h2>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#############################################################################
|
||||
|
||||
namespace :site do
|
||||
task :generated_pages => [:history, :version_file, :conduct]
|
||||
task :generated_pages => [:history, :version_file, :conduct, :contributing]
|
||||
|
||||
desc "Generate and view the site locally"
|
||||
task :preview => :generated_pages do
|
||||
@@ -103,41 +103,21 @@ namespace :site do
|
||||
|
||||
desc "Create a nicely formatted history page for the jekyll site based on the repo history."
|
||||
task :history do
|
||||
if File.exist?("History.markdown")
|
||||
history_file = File.read("History.markdown")
|
||||
front_matter = {
|
||||
"layout" => "docs",
|
||||
"title" => "History",
|
||||
"permalink" => "/docs/history/"
|
||||
}
|
||||
Dir.chdir('site/_docs/') do
|
||||
File.open("history.md", "w") do |file|
|
||||
file.write("#{front_matter.to_yaml}---\n\n")
|
||||
file.write(converted_history(history_file))
|
||||
end
|
||||
end
|
||||
else
|
||||
abort "You seem to have misplaced your History.markdown file. I can haz?"
|
||||
end
|
||||
siteify_file('History.markdown')
|
||||
end
|
||||
|
||||
desc "Copy the Code of Conduct"
|
||||
task :conduct do
|
||||
code_of_conduct = File.read("CONDUCT.markdown")
|
||||
header, _, body = code_of_conduct.partition("\n\n")
|
||||
front_matter = {
|
||||
"layout" => "docs",
|
||||
"title" => header.sub('# Contributor ', ''),
|
||||
"permalink" => "/docs/conduct/",
|
||||
"redirect_from" => "/conduct/index.html",
|
||||
"editable" => false
|
||||
}
|
||||
Dir.chdir('site/_docs') do
|
||||
File.open("conduct.md", "w") do |file|
|
||||
file.write("#{front_matter.to_yaml}---\n\n")
|
||||
file.write(body)
|
||||
end
|
||||
end
|
||||
siteify_file('CONDUCT.markdown', front_matter)
|
||||
end
|
||||
|
||||
desc "Copy the contributing file"
|
||||
task :contributing do
|
||||
siteify_file('.github/CONTRIBUTING.markdown', "title" => "Contributing")
|
||||
end
|
||||
|
||||
desc "Write the site latest_version.txt file"
|
||||
|
||||
@@ -14,6 +14,7 @@ INGORE_HREFS=$(ruby -e 'puts %w{
|
||||
twitter.com
|
||||
nearlyfreespeech.net
|
||||
eduardoboucas.com
|
||||
github.com\/matrix9180
|
||||
}.map{|h| "/#{h}/"}.join(",")')
|
||||
SOURCE="site"
|
||||
DESTINATION="_site"
|
||||
@@ -31,4 +32,4 @@ bundle exec jekyll build -s $SOURCE -d $DESTINATION --trace
|
||||
|
||||
# 3.
|
||||
msg "Proofing..."
|
||||
time bundle exec htmlproof ./$DESTINATION --href-ignore $INGORE_HREFS
|
||||
time bundle exec htmlproof ./$DESTINATION --url-ignore $INGORE_HREFS
|
||||
|
||||
@@ -5,6 +5,7 @@ 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
|
||||
@@ -17,9 +18,17 @@ collections:
|
||||
|
||||
name: Jekyll • Simple, blog-aware, static sites
|
||||
description: Transform your plain text into static websites and blogs
|
||||
url: http://jekyllrb.com
|
||||
url: https://jekyllrb.com
|
||||
|
||||
twitter:
|
||||
username: jekyllrb
|
||||
|
||||
logo: img/logo-2x.png
|
||||
|
||||
gems:
|
||||
- jekyll-feed
|
||||
- jekyll-redirect-from
|
||||
- jemoji
|
||||
- jekyll-sitemap
|
||||
- jekyll-seo-tag
|
||||
- jekyll-avatar
|
||||
|
||||
@@ -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="http://mustache.github.io">Mustache</a>
|
||||
<p>If you are using <a href="https://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>{% raw %}</code> and
|
||||
|
||||
@@ -4,13 +4,6 @@ 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
|
||||
@@ -310,11 +303,8 @@ 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 name of the collection to which it belongs is
|
||||
included in the <code>render</code> key in the site's configuration
|
||||
file.
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
---
|
||||
layout: docs
|
||||
title: Code of Conduct
|
||||
layout: docs
|
||||
permalink: "/docs/conduct/"
|
||||
note: This file is autogenerated. Edit /CONDUCT.markdown instead.
|
||||
redirect_from: "/conduct/index.html"
|
||||
editable: false
|
||||
---
|
||||
|
||||
@@ -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="http://en.wikipedia.org/wiki/Tz_database">IANA Time Zone
|
||||
<a href="https://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="http://en.wikipedia.org/wiki/List_of_tz_database_time_zones">
|
||||
available values can be found <a href="https://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 with a future date.</p>
|
||||
<p class="description">Publish posts or collection documents with a future date.</p>
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<p><code class="option">future: BOOL</code></p>
|
||||
|
||||
@@ -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 `htmlproof` command-line executable,
|
||||
Utilize it either with the convenient `htmlproofer` 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 htmlproof ./_site
|
||||
bundle exec htmlproofer ./_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
|
||||
`htmlproof --help` locally.
|
||||
`htmlproofer --help` locally.
|
||||
|
||||
For example to avoid testing external sites, use this command:
|
||||
|
||||
{% highlight bash %}
|
||||
$ bundle exec htmlproof ./_site --disable-external
|
||||
$ bundle exec htmlproofer ./_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](http://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](https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management) the dependencies based on the referenced gems:
|
||||
|
||||
{% highlight ruby %}
|
||||
source "https://rubygems.org"
|
||||
@@ -112,6 +112,8 @@ 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:
|
||||
@@ -154,7 +156,7 @@ incantation here directly:
|
||||
|
||||
{% highlight yaml %}
|
||||
install: gem install jekyll html-proofer
|
||||
script: jekyll build && htmlproof ./_site
|
||||
script: jekyll build && htmlproofer ./_site
|
||||
{% endhighlight %}
|
||||
|
||||
The `script` directive can be absolutely any valid shell command.
|
||||
@@ -202,6 +204,16 @@ 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
|
||||
@@ -218,4 +230,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]: http://jekyllrb.com/help/
|
||||
[4]: https://jekyllrb.com/help/
|
||||
|
||||
@@ -1,124 +1,127 @@
|
||||
---
|
||||
layout: docs
|
||||
title: Contributing
|
||||
permalink: /docs/contributing/
|
||||
layout: docs
|
||||
permalink: "/docs/contributing/"
|
||||
note: This file is autogenerated. Edit /.github/CONTRIBUTING.markdown instead.
|
||||
---
|
||||
|
||||
So you've got an awesome idea to throw into Jekyll. Great! Please keep the
|
||||
following in mind:
|
||||
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.
|
||||
|
||||
* **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.
|
||||
## Where to get help or report a problem
|
||||
|
||||
<div class="note warning">
|
||||
<h5>Contributions will not be accepted without tests</h5>
|
||||
<p>
|
||||
If you’re creating a small fix or patch to an existing feature, just
|
||||
a simple test will do.
|
||||
</p>
|
||||
</div>
|
||||
* 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
|
||||
|
||||
Test Dependencies
|
||||
-----------------
|
||||
Whether you're a developer, a designer, or just a Jekyll devotee, there are lots of ways to contribute. Here's a few ideas:
|
||||
|
||||
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:
|
||||
* [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.
|
||||
|
||||
<figure class="highlight"><pre><code>$ script/bootstrap</code></pre></figure>
|
||||
## Submitting a pull request
|
||||
|
||||
Before you start, run the tests and make sure that they pass (to confirm your
|
||||
environment is configured properly):
|
||||
### Pull requests generally
|
||||
|
||||
<figure class="highlight"><pre><code>$ script/cibuild</code></pre></figure>
|
||||
* 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:
|
||||
|
||||
<figure class="highlight"><pre><code>$ script/test test/blah_test.rb</code></pre></figure>
|
||||
<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:
|
||||
|
||||
<figure class="highlight"><pre><code>$ script/cucumber features/blah.feature</code></pre></figure>
|
||||
<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.
|
||||
|
||||
Workflow
|
||||
--------
|
||||
## A thank you
|
||||
|
||||
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 it’s 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>
|
||||
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!
|
||||
|
||||
@@ -25,7 +25,8 @@ 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](http://git-scm.com/) (you are using version control, right?), it’s pretty easy to automate the
|
||||
If you store your Jekyll site in [Git](https://git-scm.com/) (you are using
|
||||
version control, right?), it’s 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/).
|
||||
@@ -96,7 +97,14 @@ Another way to deploy your Jekyll site is to use [Rake](https://github.com/ruby/
|
||||
|
||||
### scp
|
||||
|
||||
Once you’ve 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). You’d obviously need to change the values to reflect your site’s details. There is even [a matching TextMate command](http://gist.github.com/214959) that will help you run this script from within Textmate.
|
||||
Once you’ve generated the `_site` directory, you can easily scp it using a
|
||||
`tasks/deploy` shell script similar to [this deploy script][]. You’d obviously
|
||||
need to change the values to reflect your site’s 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
|
||||
|
||||
### rsync
|
||||
|
||||
@@ -109,7 +117,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](http://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
|
||||
- [Download rrsync](https://ftp.samba.org/pub/unpacked/rsync/support/rrsync)
|
||||
- Place it in the `bin` subdirectory of your home folder (`~/bin`)
|
||||
- Make it executable (`chmod +x`)
|
||||
|
||||
@@ -211,3 +219,9 @@ Use [Kickster](http://kickster.nielsenramon.com/) for easy (automated) deploys t
|
||||
Kickster provides a basic Jekyll project setup packed with web best practises and useful optimization tools increasing your overall project quality. Kickster ships with automated and worry-free deployment scripts for GitHub Pages.
|
||||
|
||||
Setting up Kickster is very easy, just install the gem and you are good to go. More documentation can here found [here](https://github.com/nielsenramon/kickster#kickster). If you do not want to use the gem or start a new project you can just copy paste the deployment scripts for [Travis CI](https://github.com/nielsenramon/kickster/tree/master/snippets/travis) or [Circle CI](https://github.com/nielsenramon/kickster#automated-deployment-with-circle-ci).
|
||||
|
||||
## Aerobatic
|
||||
|
||||
[Aerobatic](https://www.aerobatic.com) is an add-on for Bitbucket that brings GitHub Pages style functionality to Bitbucket users. It includes continuous deployment, custom domains with a wildcard SSL cert, CDN, basic auth, and staging branches all in the box.
|
||||
|
||||
Automating the build and deployment of a Jekyll site is just as simple as GitHub Pages - push your changes to your repo (excluding the `_site` directory) and within seconds a build will be triggered and your built site deployed to our highly- available, globally distributed hosting service. The build process will even install and execute custom Ruby plugins. See our [Jekyll docs](https://www.aerobatic.com/docs/static-generators#jekyll) for more details.
|
||||
|
||||
@@ -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](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.
|
||||
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.
|
||||
|
||||
{% highlight html %}
|
||||
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>
|
||||
<script src="https://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/).
|
||||
|
||||
@@ -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="http://en.wikipedia.org/wiki/YAML#Lists">YAML list</a> or a
|
||||
href="https://en.wikipedia.org/wiki/YAML#Lists">YAML list</a> or a
|
||||
comma-separated string.
|
||||
|
||||
</p>
|
||||
|
||||
@@ -4,7 +4,7 @@ title: GitHub Pages
|
||||
permalink: /docs/github-pages/
|
||||
---
|
||||
|
||||
[GitHub Pages](http://pages.github.com) are public web pages for users,
|
||||
[GitHub Pages](https://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="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.
|
||||
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.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,9 +1,51 @@
|
||||
---
|
||||
layout: docs
|
||||
title: History
|
||||
layout: docs
|
||||
permalink: "/docs/history/"
|
||||
note: This file is autogenerated. Edit /History.markdown instead.
|
||||
---
|
||||
|
||||
## 3.1.2 / 2016-02-19
|
||||
{: #v3-1-2}
|
||||
|
||||
### Minor Enhancements
|
||||
{: #minor-enhancements-v3-1-2}
|
||||
|
||||
- Include `.rubocop.yml` in Gem ([#4437]({{ site.repository }}/issues/4437))
|
||||
- `LiquidRenderer#parse`: parse with line numbers. ([#4452]({{ site.repository }}/issues/4452))
|
||||
- Add consistency to the no-subcommand deprecation message ([#4505]({{ site.repository }}/issues/4505))
|
||||
|
||||
### Bug Fixes
|
||||
{: #bug-fixes-v3-1-2}
|
||||
|
||||
- Fix syntax highlighting in kramdown by making `[@config](https://github.com/config)` accessible in the Markdown converter. ([#4428]({{ site.repository }}/issues/4428))
|
||||
- `Jekyll.sanitized_path`: sanitizing a questionable path should handle tildes ([#4492]({{ site.repository }}/issues/4492))
|
||||
- Fix `titleize` so already capitalized words are not dropped ([#4525]({{ site.repository }}/issues/4525))
|
||||
- Permalinks which end in a slash should always output HTML ([#4546]({{ site.repository }}/issues/4546))
|
||||
|
||||
### Development Fixes
|
||||
{: #development-fixes-v3-1-2}
|
||||
|
||||
- Require at least cucumber version 2.1.0 ([#4514]({{ site.repository }}/issues/4514))
|
||||
|
||||
### Site Enhancements
|
||||
{: #site-enhancements-v3-1-2}
|
||||
|
||||
- Add jekyll-toc plugin ([#4429]({{ site.repository }}/issues/4429))
|
||||
- Docs: Quickstart - added documentation about the `--force` option ([#4410]({{ site.repository }}/issues/4410))
|
||||
- Fix broken links to the Code of Conduct ([#4436]({{ site.repository }}/issues/4436))
|
||||
- Upgrade notes: mention trailing slash in permalink; fixes [#4440]({{ site.repository }}/issues/4440) ([#4455]({{ site.repository }}/issues/4455))
|
||||
- Add hooks to the plugin categories toc ([#4463]({{ site.repository }}/issues/4463))
|
||||
- [add note] Jekyll 3 requires newer version of Ruby. ([#4461]({{ site.repository }}/issues/4461))
|
||||
- Fix typo in upgrading docs ([#4473]({{ site.repository }}/issues/4473))
|
||||
- Add note about upgrading documentation on jekyllrb.com/help/ ([#4484]({{ site.repository }}/issues/4484))
|
||||
- Update Rake link ([#4496]({{ site.repository }}/issues/4496))
|
||||
- Update & prune the short list of example sites ([#4374]({{ site.repository }}/issues/4374))
|
||||
- Added amp-jekyll plugin to plugins docs ([#4517]({{ site.repository }}/issues/4517))
|
||||
- A few grammar fixes ([#4512]({{ site.repository }}/issues/4512))
|
||||
- Correct a couple mistakes in structure.md ([#4522]({{ site.repository }}/issues/4522))
|
||||
|
||||
|
||||
## 3.1.1 / 2016-01-29
|
||||
{: #v3-1-1}
|
||||
|
||||
@@ -1021,7 +1063,7 @@ permalink: "/docs/history/"
|
||||
- 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))
|
||||
@@ -2019,7 +2061,7 @@ permalink: "/docs/history/"
|
||||
|
||||
- Bug Fixes
|
||||
- Fix pagination % 0 bug ([#78]({{ site.repository }}/issues/78))
|
||||
- Ensure all posts are processed first ([#71]({{ site.repository }}/issues/71)) ## NOTE
|
||||
- Ensure all posts are processed first ([#71]({{ site.repository }}/issues/71))
|
||||
- After this point I will no longer be giving credit in the history; that is what the commit log is for.
|
||||
|
||||
|
||||
|
||||
@@ -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](http://daringfireball.net/projects/markdown/))
|
||||
a converter (like [Markdown](https://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](http://pages.github.com), which means you can use Jekyll
|
||||
behind [GitHub Pages](https://pages.github.com), which means you can use Jekyll
|
||||
to host your project’s page, blog, or website from GitHub’s servers **for
|
||||
free**.
|
||||
|
||||
|
||||
@@ -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 you’ll need to make sure your system has before you start.
|
||||
|
||||
- [Ruby](http://www.ruby-lang.org/en/downloads/) (including development
|
||||
- [Ruby](https://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](http://rubygems.org/pages/download)
|
||||
- [RubyGems](https://rubygems.org/pages/download)
|
||||
- Linux, Unix, or Mac OS X
|
||||
- [NodeJS](http://nodejs.org), or another JavaScript runtime (Jekyll 2 and
|
||||
- [NodeJS](https://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)
|
||||
|
||||
|
||||
@@ -6,4 +6,4 @@ permalink: /docs/migrations/
|
||||
|
||||
If you’re switching to Jekyll from another blogging system, Jekyll’s importers
|
||||
can help you with the move. To learn more about importing your site to Jekyll,
|
||||
visit our [`jekyll-import` docs site](http://import.jekyllrb.com/docs/home/).
|
||||
visit our [`jekyll-import` docs site](https://import.jekyllrb.com/docs/home/).
|
||||
|
||||
@@ -27,11 +27,11 @@ homepage of your Jekyll-generated site.
|
||||
|
||||
## Where additional pages live
|
||||
|
||||
Where you put HTML or [Markdown](http://daringfireball.net/projects/markdown/)
|
||||
Where you put HTML or [Markdown](https://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](http://daringfireball.net/projects/markdown/)
|
||||
- Place named HTML or [Markdown](https://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.
|
||||
|
||||
@@ -11,7 +11,7 @@ having to modify the Jekyll source itself.
|
||||
<div class="note info">
|
||||
<h5>Plugins on GitHub Pages</h5>
|
||||
<p>
|
||||
<a href="http://pages.github.com/">GitHub Pages</a> is powered by Jekyll.
|
||||
<a href="https://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 won’t work if you’re 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="http://github.com/jekyll/mercenary#readme">Mercenary::Program</a></code>
|
||||
<code><a href="https://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,6 +516,18 @@ 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>
|
||||
@@ -845,6 +857,7 @@ LESS.js files during generation.
|
||||
- [Jekyll-Youtube](https://github.com/dommmel/jekyll-youtube) A Liquid tag that embeds Youtube videos. The default emded markup is responsive but you can also specify your own by using an include/partial.
|
||||
- [Jekyll Flickr Plugin](https://github.com/lawmurray/indii-jekyll-flickr) by [Lawrence Murray](http://www.indii.org): Embeds Flickr photosets (albums) as a gallery of thumbnails, with lightbox links to larger images.
|
||||
- [jekyll-figure](https://github.com/paulrobertlloyd/jekyll-figure): A liquid tag for Jekyll that generates `<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
|
||||
|
||||
@@ -884,6 +897,8 @@ 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
|
||||
|
||||
|
||||
@@ -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](http://daringfireball.net/projects/markdown/) or HTML, but can
|
||||
[Markdown](https://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](http://daringfireball.net/projects/markdown/) out of the box,
|
||||
[Markdown](https://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:
|
||||
It’s 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](http://wiki.shopify.com/Liquid) and its tags. Here’s a basic example
|
||||
of how to create a list of links to your blog posts:
|
||||
language](https://docs.shopify.com/themes/liquid/basics) and its tags. Here’s a
|
||||
basic example of how to create a list of links to your blog posts:
|
||||
|
||||
{% highlight html %}
|
||||
<ul>
|
||||
|
||||
@@ -14,7 +14,7 @@ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, ext
|
||||
- [Blogging with Git, Emacs and Jekyll](http://metajack.im/2009/01/23/blogging-with-git-emacs-and-jekyll/)
|
||||
- [Tips for working with GitHub Pages Integration](https://gist.github.com/jedschneider/2890453)
|
||||
|
||||
### Integrations
|
||||
### Integrations
|
||||
|
||||
- [Use FormKeep as a backend for forms (contact forms, hiring forms, etc.)](https://formkeep.com/guides/how-to-make-a-contact-form-in-jekyll?utm_source=github&utm_medium=jekyll-docs&utm_campaign=contact-form-jekyll)
|
||||
- [Use Simple Form to add a simple contact form](http://getsimpleform.com/)
|
||||
@@ -24,7 +24,7 @@ Jekyll’s growing use is producing a wide variety of tutorials, frameworks, ext
|
||||
|
||||
### Other commentary
|
||||
|
||||
- [‘My Jekyll Fork’, by Mike West](http://mikewest.org/2009/11/my-jekyll-fork)
|
||||
- [‘My Jekyll Fork’, by Mike West](https://mikewest.org/2009/11/my-jekyll-fork)
|
||||
|
||||
> “Jekyll is a well-architected throwback to a time before WordPress, when men were men, and HTML was static. I like the ideas it espouses, and have made a few improvements to it’s core. Here, I’ll point out some highlights of my fork in the hopes that they see usage beyond this site.”
|
||||
|
||||
@@ -35,4 +35,4 @@ Jekyll’s 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/10/adding-ajax-pagination-to-jekyll.html)
|
||||
- [Adding Ajax pagination to Jekyll](https://eduardoboucas.com/blog/2014/11/05/adding-ajax-pagination-to-jekyll.html)
|
||||
|
||||
@@ -271,6 +271,39 @@ 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>
|
||||
|
||||
@@ -30,6 +30,13 @@ 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:
|
||||
|
||||
|
||||
@@ -123,4 +123,8 @@ 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!_
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 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/).
|
||||
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/).
|
||||
|
||||
## Encoding
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
{{ post.date | date_to_string }}
|
||||
</span>
|
||||
<a href="https://github.com/{{ post.author }}" class="post-author">
|
||||
<img src="https://github.com/{{ post.author }}.png" class="avatar" alt="{{ post.author }} avatar" width="24" height="24">
|
||||
{% assign author = post.author %}
|
||||
{% avatar user=author size=24 %}
|
||||
{{ post.author }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
<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 %}
|
||||
@@ -10,6 +9,7 @@
|
||||
<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>
|
||||
|
||||
@@ -17,7 +17,7 @@ layout: news
|
||||
{{ page.date | date_to_string }}
|
||||
</span>
|
||||
<a href="https://github.com/{{ page.author }}" class="post-author">
|
||||
<img src="https://github.com/{{ page.author }}.png" class="avatar" alt="{{ page.author }} avatar" width="24" height="24">
|
||||
{% avatar {{ page.author}} size=24 %}
|
||||
{{ page.author }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
20
site/_posts/2016-02-19-jekyll-3-1-2-released.markdown
Normal file
20
site/_posts/2016-02-19-jekyll-3-1-2-released.markdown
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
layout: news_item
|
||||
title: 'Jekyll 3.1.2 Released!'
|
||||
date: 2016-02-19 15:24:00 -0800
|
||||
author: parkr
|
||||
version: 3.1.2
|
||||
categories: [release]
|
||||
---
|
||||
|
||||
Happy Friday from sunny California! Today, we're excited to announce the release of Jekyll v3.1.2, which comes with some crucial bug fixes:
|
||||
|
||||
* If a syntax error is encountered by Liquid, it will now print the line number.
|
||||
* A nasty war between symbols and strings in our configuration hash caused kramdown syntax highlighting to break. That has been resolved; you stand victorious!
|
||||
* A tilde at the beginning of a filename will no longer crash Jekyll.
|
||||
* The `titleize` filter mistakenly dropped words that were already capitalized. Fixed!
|
||||
* Permalinks which end in a slash will now always output as a folder with an `index.html` inside.
|
||||
|
||||
Nitty-gritty details, like always, are available in the [history](/docs/history/).
|
||||
|
||||
Thanks to those who contributed to this release: Alfred Xing, atomicules, bojanland, Brenton Horne, Carlos Garcés, Cash Costello, Chris, chrisfinazzo, Daniel Schildt, Dean Attali, Florian Thomas, Jordon Bedwell, Juuso Mikkonen, Katya Demidova, lonnen, Manabu Sakai, Michael Lee, Michael Lyons, Mitesh Shah, Nicolas Hoizey, Parker Moore, Pat Hawks, Prayag Verma, Robert Martin, Suriyaa Kudo, and toshi.
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
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!
|
||||
@@ -5,12 +5,20 @@ title: Getting Help
|
||||
|
||||
Need help with Jekyll? Try these resources.
|
||||
|
||||
### [Upgrading Documentation](/docs/upgrading/)
|
||||
### [Upgrading](/docs/upgrading/)
|
||||
|
||||
Did you recently upgrade from Jekyll 1 to 2 or from Jekyll 2 to 3?
|
||||
Known breaking changes are listed in the upgrading docs.
|
||||
|
||||
### [Google](https://google.com)
|
||||
### [Documentation](/docs/home/)
|
||||
|
||||
Our guide to Jekyll covering installation, writing, customization, deployment, and more.
|
||||
|
||||
### [View source](https://github.com/jekyll/jekyll/wiki/sites)
|
||||
|
||||
Learn from the source of others' Jekyll-powered sites.
|
||||
|
||||
### [Google](https://www.google.com/?q=jekyll)
|
||||
|
||||
Add **jekyll** to almost any query, and you'll find just what you need.
|
||||
|
||||
@@ -19,7 +27,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](http://stackoverflow.com/questions/tagged/jekyll)
|
||||
### [Jekyll on StackOverflow](https://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
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
layout: default
|
||||
title: Jekyll • Simple, blog-aware, static sites
|
||||
overview: true
|
||||
---
|
||||
|
||||
@@ -22,7 +21,7 @@ overview: true
|
||||
</div>
|
||||
<div class="unit one-third">
|
||||
<h2>Static</h2>
|
||||
<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">&</span> CSS go in. Static sites come out ready for deployment.</p>
|
||||
<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">&</span> CSS go in. Static sites come out ready for deployment.</p>
|
||||
<a href="/docs/templates/">Jekyll template guide →</a>
|
||||
</div>
|
||||
<div class="unit one-third">
|
||||
@@ -80,7 +79,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—<a href="https://help.github.com/articles/about-supported-custom-domains/">custom domain name</a> and all.</p>
|
||||
<a href="http://pages.github.com/">Learn more about GitHub Pages →</a>
|
||||
<a href="https://pages.github.com/">Learn more about GitHub Pages →</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.1.1
|
||||
3.1.2
|
||||
|
||||
20
site/roadmap.md
Normal file
20
site/roadmap.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
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))
|
||||
@@ -1,3 +1,10 @@
|
||||
$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
|
||||
|
||||
@@ -37,6 +37,40 @@ 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
|
||||
|
||||
@@ -68,6 +68,11 @@ 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
|
||||
|
||||
@@ -37,7 +37,7 @@ class TestConvertible < JekyllUnitTest
|
||||
out = capture_stderr do
|
||||
@convertible.read_yaml(@base, 'exploit_front_matter.erb')
|
||||
end
|
||||
refute_match /undefined class\/module DoesNotExist/, out
|
||||
refute_match(/undefined class\/module DoesNotExist/, out)
|
||||
end
|
||||
|
||||
should "not parse if there is encoding error in file" do
|
||||
|
||||
@@ -8,7 +8,7 @@ class TestEntryFilter < JekyllUnitTest
|
||||
|
||||
should "filter entries" do
|
||||
ent1 = %w[foo.markdown bar.markdown baz.markdown #baz.markdown#
|
||||
.baz.markdow foo.markdown~ .htaccess _posts _pages]
|
||||
.baz.markdow foo.markdown~ .htaccess _posts _pages ~$benbalter.docx]
|
||||
|
||||
entries = EntryFilter.new(@site).filter(ent1)
|
||||
assert_equal %w[foo.markdown bar.markdown baz.markdown .htaccess], entries
|
||||
|
||||
@@ -103,6 +103,13 @@ class TestFilters < JekyllUnitTest
|
||||
should "format a time according to RFC-822" do
|
||||
assert_equal "Wed, 27 Mar 2013 11:22:33 +0000", @filter.date_to_rfc822(@sample_time)
|
||||
end
|
||||
|
||||
should "not modify a time in-place when using filters" do
|
||||
t = Time.new(2004, 9, 15, 0, 2, 37, "+01:00")
|
||||
assert_equal 3600, t.utc_offset
|
||||
@filter.date_to_string(t)
|
||||
assert_equal 3600, t.utc_offset
|
||||
end
|
||||
end
|
||||
|
||||
context "with Date object" do
|
||||
@@ -151,7 +158,7 @@ class TestFilters < JekyllUnitTest
|
||||
end
|
||||
|
||||
should "format a time with xmlschema" do
|
||||
assert_match /2014-05-10T00:10:07/, @filter.date_to_xmlschema(@time_as_numeric)
|
||||
assert_match(/2014-05-10T00:10:07/, @filter.date_to_xmlschema(@time_as_numeric))
|
||||
end
|
||||
|
||||
should "format a time according to RFC-822" do
|
||||
@@ -289,6 +296,14 @@ class TestFilters < JekyllUnitTest
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
should "include the size of each grouping" do
|
||||
grouping = @filter.group_by(@filter.site.pages, "layout")
|
||||
grouping.each do |g|
|
||||
p g
|
||||
assert_equal g["items"].size, g["size"], "The size property for '#{g["name"]}' doesn't match the size of the Array."
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "where filter" do
|
||||
@@ -306,6 +321,21 @@ class TestFilters < JekyllUnitTest
|
||||
assert_equal 2, @filter.where(@array_of_objects, "color", "red").length
|
||||
end
|
||||
|
||||
should "filter array properties appropriately" do
|
||||
hash = {"a"=>{"tags"=>["x","y"]}, "b"=>{"tags"=>["x"]}, "c"=>{"tags"=>["y","z"]}}
|
||||
assert_equal 2, @filter.where(hash, "tags", "x").length
|
||||
end
|
||||
|
||||
should "filter array properties alongside string properties" do
|
||||
hash = {"a"=>{"tags"=>["x","y"]}, "b"=>{"tags"=>"x"}, "c"=>{"tags"=>["y","z"]}}
|
||||
assert_equal 2, @filter.where(hash, "tags", "x").length
|
||||
end
|
||||
|
||||
should "not match substrings" do
|
||||
hash = {"a"=>{"category"=>"bear"}, "b"=>{"category"=>"wolf"}, "c"=>{"category"=>["bear","lion"]}}
|
||||
assert_equal 0, @filter.where(hash, "category", "ear").length
|
||||
end
|
||||
|
||||
should "stringify during comparison for compatibility with liquid parsing" do
|
||||
hash = {
|
||||
"The Words" => {"rating" => 1.2, "featured" => false},
|
||||
@@ -364,6 +394,10 @@ class TestFilters < JekyllUnitTest
|
||||
should "return a HTML-escaped string representation of an object" do
|
||||
assert_equal "{"<a>"=>1}", @filter.inspect({ "<a>" => 1 })
|
||||
end
|
||||
|
||||
should "quote strings" do
|
||||
assert_equal ""string"", @filter.inspect("string")
|
||||
end
|
||||
end
|
||||
|
||||
context "slugify filter" do
|
||||
|
||||
@@ -14,6 +14,7 @@ class TestKramdown < JekyllUnitTest
|
||||
'auto_ids' => false,
|
||||
'footnote_nr' => 1,
|
||||
|
||||
'syntax_highlighter' => 'rouge',
|
||||
'syntax_highlighter_opts' => {
|
||||
'bold_every' => 8, 'css' => :class
|
||||
}
|
||||
|
||||
@@ -29,6 +29,15 @@ class TestNewCommand < JekyllUnitTest
|
||||
assert_exist @full_path
|
||||
end
|
||||
|
||||
should "create a Gemfile" do
|
||||
gemfile = File.join(@full_path, "Gemfile")
|
||||
refute_exist @full_path
|
||||
capture_stdout { Jekyll::Commands::New.process(@args) }
|
||||
assert_exist gemfile
|
||||
assert_match /gem "jekyll", "#{Jekyll::VERSION}"/, File.read(gemfile)
|
||||
assert_match /gem "github-pages"/, File.read(gemfile)
|
||||
end
|
||||
|
||||
should 'display a success message' do
|
||||
Jekyll::Commands::New.process(@args)
|
||||
output = Jekyll.logger.messages.last
|
||||
@@ -40,6 +49,7 @@ class TestNewCommand < JekyllUnitTest
|
||||
static_template_files = dir_contents(site_template).reject do |f|
|
||||
File.extname(f) == '.erb'
|
||||
end
|
||||
static_template_files << "/Gemfile"
|
||||
|
||||
capture_stdout { Jekyll::Commands::New.process(@args) }
|
||||
|
||||
@@ -81,7 +91,7 @@ class TestNewCommand < JekyllUnitTest
|
||||
should 'force created folder' do
|
||||
capture_stdout { Jekyll::Commands::New.process(@args) }
|
||||
output = capture_stdout { Jekyll::Commands::New.process(@args, '--force') }
|
||||
assert_match /New jekyll site installed in/, output
|
||||
assert_match(/New jekyll site installed in/, output)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -232,13 +232,13 @@ class TestSite < JekyllUnitTest
|
||||
context 'error handling' do
|
||||
should "raise if destination is included in source" do
|
||||
assert_raises Jekyll::Errors::FatalException do
|
||||
site = Site.new(site_configuration('destination' => source_dir))
|
||||
Site.new(site_configuration('destination' => source_dir))
|
||||
end
|
||||
end
|
||||
|
||||
should "raise if destination is source" do
|
||||
assert_raises Jekyll::Errors::FatalException do
|
||||
site = Site.new(site_configuration('destination' => File.join(source_dir, "..")))
|
||||
Site.new(site_configuration('destination' => File.join(source_dir, "..")))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -520,7 +520,6 @@ class TestSite < JekyllUnitTest
|
||||
contacts_html = @site.pages.find { |p| p.name == "contacts.html" }
|
||||
@site.process
|
||||
|
||||
source = @site.in_source_dir(contacts_html.path)
|
||||
dest = File.expand_path(contacts_html.destination(@site.dest))
|
||||
mtime1 = File.stat(dest).mtime.to_i # first run must generate dest file
|
||||
|
||||
|
||||
@@ -11,9 +11,8 @@ class TestTags < JekyllUnitTest
|
||||
def create_post(content, override = {}, converter_class = Jekyll::Converters::Markdown)
|
||||
site = fixture_site({"highlighter" => "rouge"}.merge(override))
|
||||
|
||||
if override['read_posts']
|
||||
site.posts.docs.concat(PostReader.new(site).read_posts(''))
|
||||
end
|
||||
site.posts.docs.concat(PostReader.new(site).read_posts('')) if override['read_posts']
|
||||
CollectionReader.new(site).read if override['read_collections']
|
||||
|
||||
info = { :filters => [Jekyll::Filters], :registers => { :site => site } }
|
||||
@converter = site.converters.find { |c| c.class == converter_class }
|
||||
@@ -150,7 +149,7 @@ CONTENT
|
||||
end
|
||||
|
||||
should "not cause a markdown error" do
|
||||
refute_match /markdown\-html\-error/, @result
|
||||
refute_match(/markdown\-html\-error/, @result)
|
||||
end
|
||||
|
||||
should "render markdown with pygments" do
|
||||
@@ -317,6 +316,27 @@ EOS
|
||||
end
|
||||
end
|
||||
|
||||
context "post content has highlight tag with linenumbers" do
|
||||
setup do
|
||||
create_post <<-EOS
|
||||
---
|
||||
title: This is a test
|
||||
---
|
||||
|
||||
This is not yet highlighted
|
||||
{% highlight php linenos %}
|
||||
test
|
||||
{% endhighlight %}
|
||||
|
||||
This should not be highlighted, right?
|
||||
EOS
|
||||
end
|
||||
|
||||
should "should stop highlighting at boundary" do
|
||||
assert_match "<p>This is not yet highlighted</p>\n\n<figure class=\"highlight\"><pre><code class=\"language-php\" data-lang=\"php\"><table style=\"border-spacing: 0\"><tbody><tr><td class=\"gutter gl\" style=\"text-align: right\"><pre class=\"lineno\">1</pre></td><td class=\"code\"><pre>test<span class=\"w\">\n</span></pre></td></tr></tbody></table></code></pre></figure>\n\n<p>This should not be highlighted, right?</p>", @result
|
||||
end
|
||||
end
|
||||
|
||||
context "post content has highlight tag with preceding spaces & Windows-style newlines" do
|
||||
setup do
|
||||
fill_post "\r\n\r\n\r\n [,1] [,2]"
|
||||
@@ -422,7 +442,7 @@ CONTENT
|
||||
end
|
||||
|
||||
should "not cause an error" do
|
||||
refute_match /markdown\-html\-error/, @result
|
||||
refute_match(/markdown\-html\-error/, @result)
|
||||
end
|
||||
|
||||
should "have the url to the \"complex\" post from 2008-11-21" do
|
||||
@@ -446,7 +466,7 @@ CONTENT
|
||||
end
|
||||
|
||||
should "not cause an error" do
|
||||
refute_match /markdown\-html\-error/, @result
|
||||
refute_match(/markdown\-html\-error/, @result)
|
||||
end
|
||||
|
||||
should "have the url to the \"complex\" post from 2008-11-21" do
|
||||
@@ -468,10 +488,97 @@ title: Invalid post name linking
|
||||
---
|
||||
|
||||
{% post_url abc2008-11-21-complex %}
|
||||
CONTENT
|
||||
|
||||
assert_raises Jekyll::Errors::PostURLError do
|
||||
create_post(content, {
|
||||
'permalink' => 'pretty',
|
||||
'source' => source_dir,
|
||||
'destination' => dest_dir,
|
||||
'read_posts' => true
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
should "cause an error with a bad date" do
|
||||
content = <<CONTENT
|
||||
---
|
||||
title: Invalid post name linking
|
||||
---
|
||||
|
||||
{% post_url 2008-42-21-complex %}
|
||||
CONTENT
|
||||
|
||||
assert_raises Jekyll::Errors::InvalidDateError do
|
||||
create_post(content, {
|
||||
'permalink' => 'pretty',
|
||||
'source' => source_dir,
|
||||
'destination' => dest_dir,
|
||||
'read_posts' => true
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "simple page with linking" do
|
||||
setup do
|
||||
content = <<CONTENT
|
||||
---
|
||||
title: linking
|
||||
---
|
||||
|
||||
{% link _methods/yaml_with_dots.md %}
|
||||
CONTENT
|
||||
create_post(content, {'source' => source_dir, 'destination' => dest_dir, 'collections' => { 'methods' => { 'output' => true }}, 'read_collections' => true})
|
||||
end
|
||||
|
||||
should "not cause an error" do
|
||||
refute_match /markdown\-html\-error/, @result
|
||||
end
|
||||
|
||||
should "have the url to the \"yaml_with_dots\" item" do
|
||||
assert_match %r{/methods/yaml_with_dots\.html}, @result
|
||||
end
|
||||
end
|
||||
|
||||
context "simple page with nested linking" do
|
||||
setup do
|
||||
content = <<CONTENT
|
||||
---
|
||||
title: linking
|
||||
---
|
||||
|
||||
- 1 {% link _methods/sanitized_path.md %}
|
||||
- 2 {% link _methods/site/generate.md %}
|
||||
CONTENT
|
||||
create_post(content, {'source' => source_dir, 'destination' => dest_dir, 'collections' => { 'methods' => { 'output' => true }}, 'read_collections' => true})
|
||||
end
|
||||
|
||||
should "not cause an error" do
|
||||
refute_match /markdown\-html\-error/, @result
|
||||
end
|
||||
|
||||
should "have the url to the \"sanitized_path\" item" do
|
||||
assert_match %r{1\s/methods/sanitized_path\.html}, @result
|
||||
end
|
||||
|
||||
should "have the url to the \"site/generate\" item" do
|
||||
assert_match %r{2\s/methods/site/generate\.html}, @result
|
||||
end
|
||||
end
|
||||
|
||||
context "simple page with invalid linking" do
|
||||
should "cause an error" do
|
||||
content = <<CONTENT
|
||||
---
|
||||
title: Invalid linking
|
||||
---
|
||||
|
||||
{% link non-existent-collection-item %}
|
||||
CONTENT
|
||||
|
||||
assert_raises ArgumentError do
|
||||
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true})
|
||||
create_post(content, {'source' => source_dir, 'destination' => dest_dir, 'collections' => { 'methods' => { 'output' => true }}, 'read_collections' => true})
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -493,7 +600,8 @@ title: Include symlink
|
||||
CONTENT
|
||||
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true, 'safe' => true })
|
||||
end
|
||||
refute_match /SYMLINK TEST/, @result
|
||||
@result ||= ''
|
||||
refute_match(/SYMLINK TEST/, @result)
|
||||
end
|
||||
|
||||
should "not expose the existence of symlinked files" do
|
||||
@@ -508,7 +616,7 @@ title: Include symlink
|
||||
CONTENT
|
||||
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true, 'safe' => true })
|
||||
end
|
||||
assert_match /should exist and should not be a symlink/, ex.message
|
||||
assert_match(/should exist and should not be a symlink/, ex.message)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -770,7 +878,8 @@ title: Include symlink
|
||||
CONTENT
|
||||
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true, 'safe' => true })
|
||||
end
|
||||
refute_match /SYMLINK TEST/, @result
|
||||
@result ||= ''
|
||||
refute_match(/SYMLINK TEST/, @result)
|
||||
end
|
||||
|
||||
should "not expose the existence of symlinked files" do
|
||||
@@ -785,7 +894,7 @@ title: Include symlink
|
||||
CONTENT
|
||||
create_post(content, {'permalink' => 'pretty', 'source' => source_dir, 'destination' => dest_dir, 'read_posts' => true, 'safe' => true })
|
||||
end
|
||||
assert_match /should exist and should not be a symlink/, ex.message
|
||||
assert_match(/should exist and should not be a symlink/, ex.message)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -63,12 +63,12 @@ class TestURL < JekyllUnitTest
|
||||
},
|
||||
})
|
||||
site.read
|
||||
doc = site.collections["methods"].docs.find do |doc|
|
||||
matching_doc = site.collections["methods"].docs.find do |doc|
|
||||
doc.relative_path == "_methods/escape-+ #%20[].md"
|
||||
end
|
||||
assert_equal '/methods/escape-+-20/escape-20.html', URL.new(
|
||||
:template => '/methods/:title/:name:output_ext',
|
||||
:placeholders => doc.url_placeholders
|
||||
:placeholders => matching_doc.url_placeholders
|
||||
).to_s
|
||||
end
|
||||
|
||||
|
||||
@@ -95,20 +95,20 @@ class TestUtils < JekyllUnitTest
|
||||
end
|
||||
|
||||
should "throw an error if the input contains no date data" do
|
||||
assert_raises Jekyll::Errors::FatalException do
|
||||
assert_raises Jekyll::Errors::InvalidDateError do
|
||||
Utils.parse_date("Blah")
|
||||
end
|
||||
end
|
||||
|
||||
should "throw an error if the input is out of range" do
|
||||
assert_raises Jekyll::Errors::FatalException do
|
||||
assert_raises Jekyll::Errors::InvalidDateError do
|
||||
Utils.parse_date("9999-99-99")
|
||||
end
|
||||
end
|
||||
|
||||
should "throw an error with the default message if no message is passed in" do
|
||||
date = "Blah this is invalid"
|
||||
assert_raises Jekyll::Errors::FatalException, "Invalid date '#{date}': Input could not be parsed." do
|
||||
assert_raises Jekyll::Errors::InvalidDateError, "Invalid date '#{date}': Input could not be parsed." do
|
||||
Utils.parse_date(date)
|
||||
end
|
||||
end
|
||||
@@ -116,7 +116,7 @@ class TestUtils < JekyllUnitTest
|
||||
should "throw an error with the provided message if a message is passed in" do
|
||||
date = "Blah this is invalid"
|
||||
message = "Aaaah, the world has exploded!"
|
||||
assert_raises Jekyll::Errors::FatalException, "Invalid date '#{date}': #{message}" do
|
||||
assert_raises Jekyll::Errors::InvalidDateError, "Invalid date '#{date}': #{message}" do
|
||||
Utils.parse_date(date, message)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user