Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jekyll/jekyll into static…
Browse files Browse the repository at this point in the history
…-asset-reader
  • Loading branch information
ashmaroli committed Mar 31, 2017
2 parents 194fbc9 + 5dee5a0 commit 9915840
Show file tree
Hide file tree
Showing 66 changed files with 998 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.markdown
Expand Up @@ -28,7 +28,7 @@ Whether you're a developer, a designer, or just a Jekyll devotee, there are lots

* 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/).
* Pull requests 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.

Expand Down
1 change: 0 additions & 1 deletion .rubocop.yml
Expand Up @@ -4,7 +4,6 @@ AllCops:
Include:
- lib/**/*.rb
Exclude:
- lib/jekyll/renderer.rb
- bin/**/*
- exe/**/*
- benchmark/**/*
Expand Down
15 changes: 12 additions & 3 deletions .travis.yml
Expand Up @@ -5,9 +5,10 @@ language: ruby
sudo: false

rvm:
- &ruby1 2.3.3
- &ruby2 2.2.6
- &ruby3 2.1.10
- &ruby1 2.4.0
- &ruby2 2.3.4
- &ruby3 2.2.7
- &ruby4 2.1.10
- &jruby jruby-9.1.7.0

matrix:
Expand All @@ -16,6 +17,10 @@ matrix:
env: TEST_SUITE=fmt
- rvm: *ruby1
env: TEST_SUITE=default-site
- rvm: *ruby2
env: TEST_SUITE=fmt
- rvm: *ruby2
env: TEST_SUITE=default-site
exclude:
- rvm: *jruby
env: TEST_SUITE=cucumber
Expand All @@ -28,6 +33,7 @@ branches:
only:
- master
- themes
- /*-stable/

notifications:
slack:
Expand All @@ -48,3 +54,6 @@ addons:
# regular test configuration
after_success:
- bundle exec codeclimate-test-reporter

before_install:
- gem update --system
4 changes: 3 additions & 1 deletion Gemfile
Expand Up @@ -25,8 +25,9 @@ group :test do
gem "nokogiri"
gem "rspec"
gem "rspec-mocks"
gem "rubocop", "~> 0.47"
gem "rubocop", "~> 0.47.1"
gem "test-theme", :path => File.expand_path("./test/fixtures/test-theme", File.dirname(__FILE__))
gem "test-dependency-theme", :path => File.expand_path("./test/fixtures/test-dependency-theme", File.dirname(__FILE__))

gem "jruby-openssl" if RUBY_ENGINE == "jruby"
end
Expand Down Expand Up @@ -76,6 +77,7 @@ group :jekyll_optional_dependencies do
gem "classifier-reborn", "~> 2.1.0"
gem "liquid-c", "~> 3.0"
gem "pygments.rb", "~> 0.6.0"
gem "yajl-ruby", git: "https://github.com/parkr/yajl-ruby", branch: "1.2.x-unify-fixnum-to-integer"
gem "rdiscount", "~> 2.0"
gem "redcarpet", "~> 3.2", ">= 3.2.3"
end
Expand Down
47 changes: 47 additions & 0 deletions History.markdown
Expand Up @@ -4,6 +4,11 @@

* Upgrade to Liquid v4 (#4362)
* Convert StaticFile liquid representation to a Drop & add front matter defaults support to StaticFiles (#5871)
* Add support for Tab-Separated Values data files (`*.tsv`) (#5985)
* Specify version constraint in subcommand error message. (#5974)
* Add a template for custom 404 page (#5945)
* Require `runtime_dependencies` of a Gem-based theme from its `.gemspec` file (#5914)
* Don't raise an error if URL contains a colon (#5889)

### Documentation

Expand All @@ -19,22 +24,64 @@
* update broken links (#5905)
* Fix typo in contribution information (#5910)
* update plugin repo URL to reflect repo move (#5916)
* Update exclude array in configuration.md (#5947)
* Fixed path in "Improve this page" link in Tutorials section (#5951)
* Corrected permalink (#5949)
* Included more details about adding defaults to static files (#5971)
* Create buddyworks (#5962)
* added (buddyworks) to ci list (#5965)
* Add a tutorial on serving custom Error 404 page (#5946)
* add custom 404 to tutorial navigation (#5978)
* Add link to order of interpretation tutorial in Tutorials nav (#5952)
* Document Jekyll's Philosophy (#5792)
* Require Ruby > 2.1.0 (#5983)
* Fix broken link (#5994)
* Default options for script/proof (#5995)
* Mention Bash on Ubuntu on Windows (#5960)
* Document `--unpublished` flag introduced in 91e9ecf (#5959)
* Update upgrading.md to mention usage of `bundle update` (#5604)

### Development Fixes

* [Rubocop] add missing comma (#5835)
* Appease classifier-reborn (#5934)
* Allow releases & development on `*-stable` branches (#5926)
* Add script/backport-pr (#5925)
* Prefer .yaml over .toml (#5966)
* Fix Appveyor with DST-aware cucumber steps (#5961)
* Use Rubocop v0.47.1 till we're ready for v0.48 (#5989)
* Test against Ruby 2.4.0 (#5687)
* rubocop: lib/jekyll/renderer.rb complexity fixes (#5052)

### Site Enhancements

* Corrected date for version 3.4.0 (#5842)
* Add the correct year to the 3.4.0 release date (#5858)
* Add documentation about order of interpretation (#5834)
* Documentation on how to build navigation (#5698)
* Navigation has been moved out from docs (#5927)
* Make links in sidebar for current page more prominent (#5820)

### Bug Fixes

* Exclude Gemfile by default (#5860)
* Convertible#validate_permalink!: ensure the return value of data["permalink"] is a string before asking if it is empty (#5878)
* Allow abbreviated post dates (#5920)
* Remove dependency on include from default about.md (#5903)
* Allow colons in `uri_escape` filter (#5957)
* Re-surface missing public methods in `Jekyll::Document` (#5975)

## 3.4.3 / 2017-03-21

* Backport #5957 for v3.4.x: Allow colons in `uri_escape` filter (#5968)

## 3.4.2 / 2017-03-09

* Backport #5871 for v3.4.x: Convert StaticFile liquid representation to a Drop & add front matter defaults support to StaticFiles (#5940)

## 3.4.1 / 2017-03-02

* Backport #5920 for v3.4.x: Allow abbreviated post dates (#5924)

## 3.4.0 / 2017-01-27

Expand Down
1 change: 0 additions & 1 deletion docs/_data/docs.yml
Expand Up @@ -26,7 +26,6 @@
- includes
- permalinks
- pagination
- navigation
- plugins
- themes
- extras
Expand Down
4 changes: 3 additions & 1 deletion docs/_data/tutorials.yml
Expand Up @@ -2,7 +2,9 @@
tutorials:
- home
- navigation
- orderofinterpretation
- custom-404-page

#- title: Another section
# tutorials:
# - sample
# - sample
2 changes: 1 addition & 1 deletion docs/_docs/configuration.md
Expand Up @@ -603,7 +603,7 @@ collections:
# Handling Reading
safe: false
include: [".htaccess"]
exclude: ["node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"]
exclude: ["Gemfile", "Gemfile.lock", node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"]
keep_files: [".git", ".svn"]
encoding: "utf-8"
markdown_ext: "markdown,mkdown,mkdn,mkd,md"
Expand Down
62 changes: 62 additions & 0 deletions docs/_docs/continuous-integration/buddyworks.md
@@ -0,0 +1,62 @@
---
title: "BuddyWorks"
---

[BuddyWorks][buddyworks-homepage] is a [Docker][docker-homepage]-based CI server that you can set up in 15-20 minutes to build, test, and deploy your Jekyll websites. It supports [GitHub][github-homepage], [Bitbucket][bitbucket-homepage], and [GitLab][gitlab-homepage] repositories, and can be installed on-premises or used in cloud. The following guide will show you how to set up a free environment to build and test your Jekyll project.

[buddyworks-homepage]: https://buddy.works
[docker-homepage]: https://www.docker.com/
[github-homepage]: https://github.com
[bitbucket-homepage]: https://bitbucket.org/
[gitlab-homepage]: https://gitlab.com

## 1. Getting started

1. Log in at https://buddy.works with your GitHub/Bitbucket account or email
2. Choose your Git provider and select or push your Jekyll Project
3. Create a new pipeline and set the trigger mode to 'On every push'
4. Add and configure the Jekyll action and save the pipeline

## 2. How it works

Whenever you make a push to the selected branch, the Jekyll action runs `jekyll build` in an isolated [Jekyll Docker image][jekyll-docker-image]. The output is generated to the `/filesystem` directory, and can be further deployed to FTP/SFTP and IaaS services. You can add your own commands, install additional packages, attach services, and run Selenium tests, as well as add other actions down the pipeline, eg. a Slack notification or an SSH script that will restart your server.

![Jekyll Build](https://buddy.works/data/blog/_images/buddyworks-jekyll-small.png)

[jekyll-docker-image]: https://hub.docker.com/r/jekyll/jekyll/

## 3. Using YAML for configuration

If you prefer configuration as code over GUI, you can generate a `buddy.yml` that will create a pipeline with the Jekyll action once you push it to the target branch:

```ruby
- pipeline: "Build and Deploy Jekyll site"
trigger_mode: "ON_EVERY_PUSH"
ref_name: "master"
actions:
- action: "Execute: jekyll build"
type: "BUILD"
docker_image_name: "jekyll/jekyll"
docker_image_tag: "latest"
execute_commands:
- "chown jekyll:jekyll $WORKING_DIR"
- "jekyll build"
```

## 4. Setting up on-premises server

The self-hosted version of BuddyWorks can be installed on any type of server supporting Docker, including [Linux][bw-linux], [Mac][bw-mac], [AWS EC2][bw-aws-ec2], [DigitalOcean][bw-digitalocean], and [Microsoft Azure][bw-azure].

[bw-linux]: https://buddy.works/knowledge/standalone/installation-linux
[bw-mac]: https://buddy.works/knowledge/standalone/installation-mac-osx
[bw-aws-ec2]: https://buddy.works/knowledge/standalone/installation-amazon-ec2
[bw-digitalocean]: https://buddy.works/knowledge/standalone/installation-digitalocean
[bw-azure]: https://buddy.works/knowledge/standalone/installation-azure

## 5. Questions?

This entire guide is open-source. Go ahead and [edit it][jekyll-docs-ci-buddyworks] if you want to expand it or have a fix or [ask for help][jekyll-help] if you run into trouble and need assistance. BuddyWorks also has an [online community][buddyworks-forum] for help.

[jekyll-docs-ci-buddyworks]: https://github.com/jekyll/jekyll/edit/master/docs/_docs/continuous-integration/buddyworks.md
[jekyll-help]: https://jekyllrb.com/help/
[buddyworks-forum]: http://forum.buddy.works/
1 change: 1 addition & 0 deletions docs/_docs/continuous-integration/index.md
Expand Up @@ -7,3 +7,4 @@ Continuous Integration (CI) enables you to publish your Jekyll generated website

* [Travis CI](travis-ci)
* [CircleCI](circleci)
* [BuddyWorks](buddyworks)
2 changes: 1 addition & 1 deletion docs/_docs/datafiles.md
Expand Up @@ -153,4 +153,4 @@ author: dave
{% endraw %}
```

For information on how to build robust navigation for your site (especially if you have a documentation website or another type of Jekyll site with a lot of pages to organize), see [Navigation](../navigation).
For information on how to build robust navigation for your site (especially if you have a documentation website or another type of Jekyll site with a lot of pages to organize), see [Navigation](/tutorials/navigation).
8 changes: 8 additions & 0 deletions docs/_docs/frontmatter.md
Expand Up @@ -99,6 +99,14 @@ front matter of a page or post.
</table>
</div>

<div class="note">
<h5>ProTip™: Render Posts Marked As Unpublished</h5>
<p>
To preview unpublished pages, simply run `jekyll serve` or `jekyll build`
with the `--unpublished` switch. Jekyll also has a handy <a href="../drafts/">drafts</a>
feature tailored specifically for blog posts.
</p>
</div>

## Custom Variables

Expand Down
18 changes: 18 additions & 0 deletions docs/_docs/history.md
Expand Up @@ -4,6 +4,24 @@ permalink: "/docs/history/"
note: This file is autogenerated. Edit /History.markdown instead.
---

## 3.4.3 / 2017-03-21
{: #v3-4-3}

- Backport [#5957]({{ site.repository }}/issues/5957) for v3.4.x: Allow colons in `uri_escape` filter ([#5968]({{ site.repository }}/issues/5968))


## 3.4.2 / 2017-03-09
{: #v3-4-2}

- Backport [#5871]({{ site.repository }}/issues/5871) for v3.4.x: Convert StaticFile liquid representation to a Drop & add front matter defaults support to StaticFiles ([#5940]({{ site.repository }}/issues/5940))


## 3.4.1 / 2017-03-02
{: #v3-4-1}

- Backport [#5920]({{ site.repository }}/issues/5920) for v3.4.x: Allow abbreviated post dates ([#5924]({{ site.repository }}/issues/5924))


## 3.4.0 / 2017-01-27
{: #v3-4-0}

Expand Down
2 changes: 1 addition & 1 deletion docs/_docs/posts.md
Expand Up @@ -42,7 +42,7 @@ file. For example, the following are examples of valid post filenames:
<div class="note">
<h5>ProTip™: Link to other posts</h5>
<p>
Use the <a href="../templates/#post-url"><code>post_url</code></a>
Use the <a href="../templates/#linking-to-posts"><code>post_url</code></a>
tag to link to other posts without having to worry about the URL's
breaking when the site permalink style changes.
</p>
Expand Down
4 changes: 2 additions & 2 deletions docs/_docs/quickstart.md
Expand Up @@ -4,7 +4,7 @@ permalink: /docs/quickstart/
---


If you already have a full [Ruby](https://www.ruby-lang.org/en/downloads/) development environment with all headers and [RubyGems](https://rubygems.org/pages/download) installed (see Jekyll's [requirements](/docs/installation/#requirements/)), you can create a new Jekyll site by doing the following:
If you already have a full [Ruby](https://www.ruby-lang.org/en/downloads/) development environment with all headers and [RubyGems](https://rubygems.org/pages/download) installed (see Jekyll's [requirements](/docs/installation/#requirements)), you can create a new Jekyll site by doing the following:

```sh
# Install Jekyll and Bundler gems through RubyGems
Expand All @@ -22,7 +22,7 @@ If you already have a full [Ruby](https://www.ruby-lang.org/en/downloads/) devel
# Now browse to http://localhost:4000
```

If you encounter any unexpected errors during the above, please refer to the already-mentioned [requirements](/docs/installation/#requirements/) page, as you might be missing development headers or other prerequisites.
If you encounter any unexpected errors during the above, please refer to the already-mentioned [requirements](/docs/installation/#requirements) page, as you might be missing development headers or other prerequisites.

## About Bundler

Expand Down
31 changes: 31 additions & 0 deletions docs/_docs/static_files.md
Expand Up @@ -65,3 +65,34 @@ following metadata:
</tbody>
</table>
</div>

Note that in the above table, `file` can be anything. It's simply an arbitrarily set variable used in your own logic (such as in a for loop). It isn't a global site or page variable.

## Add front matter to static files

Although you can't directly add front matter values to static files, you can set front matter values through the [defaults property](../configuration/#front-matter-defaults) in your configuration file. When Jekyll builds the site, it will use the front matter values you set.

Here's an example:

In your `_config.yml` file, add the following values to the `defaults` property:

```yaml
defaults:
- scope:
path: "assets/img"
values:
image: true
```

This assumes that your Jekyll site has a folder path of `assets/img` where you have images (static files) stored. When Jekyll builds the site, it will treat each image as if it had the front matter value of `image: true`.

Suppose you want to list all your image assets as contained in `assets/img`. You could use this for loop to look in the `static_files` object and get all static files that have this front matter property:

```liquid
{% raw %}{% assign image_files = site.static_files | where: "image", true %}
{% for myimage in image_files %}
{{ myimage.path }}
{% endfor %}{% endraw %}
```

When you build your site, the output will list the path to each file that meets this front matter condition.
12 changes: 9 additions & 3 deletions docs/_docs/themes.md
Expand Up @@ -141,7 +141,7 @@ To install a gem-based theme:
bundle exec jekyll serve
```

You can have multiple themes listed in your site's `Gemfile`, but only one theme can be selected in your site's `_config.yml`.
You can have multiple themes listed in your site's `Gemfile`, but only one theme can be selected in your site's `_config.yml`.
{: .note .info }

If you're publishing your Jekyll site on [GitHub Pages](https://pages.github.com/), note that GitHub Pages supports only some gem-based themes. See [Supported Themes](https://pages.github.com/themes/) in GitHub's documentation to see which themes are supported.
Expand Down Expand Up @@ -184,7 +184,7 @@ For example, if your theme has a `/_layouts/page.html` file, and a page has `lay
Any file in `/assets` will be copied over to the user's site upon build unless they have a file with the same relative path. You can ship any kind of asset here: SCSS, an image, a webfont, etc. These files behave like pages and static files in Jekyll:
- If the file has [YAML front matter](../docs/frontmatter/) at the top, it will be rendered.
- If the file has [YAML front matter](/docs/frontmatter/) at the top, it will be rendered.
- If the file does not have YAML front matter, it will simply be copied over into the resulting site.
This allows theme creators to ship a default `/assets/styles.scss` file which their layouts can depend on as `/assets/styles.css`.
Expand All @@ -206,6 +206,12 @@ Your theme's styles can be included in the user's stylesheet using the `@import`
{% raw %}@import "{{ site.theme }}";{% endraw %}
```
### Theme-gem dependencies
From `v3.5`, Jekyll will automatically require all whitelisted `runtime_dependencies` of your theme-gem even if they're not explicitly included under the `gems` array in the site's config file. (NOTE: whitelisting is only required when building or serving with the `--safe` option.)
With this, the end-user need not keep track of the plugins required to be included in their config file for their theme-gem to work as intended.
### Documenting your theme
Your theme should include a `/README.md` file, which explains how site authors can install and use your theme. What layouts are included? What includes? Do they need to add anything special to their site's configuration file?
Expand All @@ -218,7 +224,7 @@ Themes are visual. Show users what your theme looks like by including a screensh
To preview your theme as you're authoring it, it may be helpful to add dummy content in, for example, `/index.html` and `/page.html` files. This will allow you to use the `jekyll build` and `jekyll serve` commands to preview your theme, just as you'd preview a Jekyll site.
If you do preview your theme locally, be sure to add `/_site` to your theme's `.gitignore` file to prevent the compiled site from also being included when you distribute your theme.
If you do preview your theme locally, be sure to add `/_site` to your theme's `.gitignore` file to prevent the compiled site from also being included when you distribute your theme.
{: .info .note}
### Publishing your theme
Expand Down

0 comments on commit 9915840

Please sign in to comment.