Merge branch 'master' into sponsor

This commit is contained in:
olivia
2018-07-17 12:20:54 +02:00
50 changed files with 1177 additions and 1034 deletions

View File

@@ -61,7 +61,7 @@ test:
## Complete Example circle.yml File
When you put it all together, here's an example of what that `circle.yml` file could look like:
When you put it all together, here's an example of what that `circle.yml` file could look like in v1:
```yaml
machine:
@@ -83,6 +83,75 @@ deployment:
- rsync -va --delete ./_site username@my-website:/var/html
```
for CircleCI v2, a Docker-based system which new projects will follow, set the `S3_BUCKET_NAME` environment variable (an example of the required config file is shown below).
```yaml
defaults: &defaults
working_directory: ~/repo
version: 2
jobs:
build:
<<: *defaults
docker:
- image: circleci/ruby:2.5
environment:
BUNDLE_PATH: ~/repo/vendor/bundle
steps:
- checkout
- restore_cache:
keys:
- rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
- rubygems-v1-fallback
- run:
name: Bundle Install
command: bundle check || bundle install
- run:
name: HTMLProofer tests
command: |
bundle exec htmlproofer ./_site \
--allow-hash-href \
--check-favicon \
--check-html \
--disable-external
- save_cache:
key: rubygems-v1-{% raw %}{{ checksum "Gemfile.lock" }}{% endraw %}
paths:
- vendor/bundle
- run:
name: Jekyll build
command: bundle exec jekyll build
- persist_to_workspace:
root: ./
paths:
- _site
deploy:
<<: *defaults
docker:
- image: circleci/python:3.6.3
environment:
S3_BUCKET_NAME: <<YOUR BUCKET NAME HERE>>
steps:
- attach_workspace:
at: ./
- run:
name: Install AWS CLI
command: pip install awscli --upgrade --user
- run:
name: Upload to s3
command: ~/.local/bin/aws s3 sync ./_site s3://$S3_BUCKET_NAME/ --delete --acl public-read
workflows:
version: 2
test-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: master
```
## Questions?
This entire guide is open-source. Go ahead and [edit it][7] if you have a fix or [ask for help][8] if you run into trouble and need some help. CircleCI also has an [online community][9] for help.

View File

@@ -828,6 +828,7 @@ You can find a few useful plugins at the following locations:
- [replace_regex](https://github.com/sparanoid/replace_regex): A Liquid filter to perform regex replace.
- [Jekyll Money](https://rubygems.org/gems/jekyll-money): A Jekyll plugin for dealing with money. Because we all have to at some point.
- [jekyll-random](https://github.com/codecalm/jekyll-random) by [codecalm](https://nodecalm.net): A Jekyll plugin that generates pseudo-random data. Very useful when you want to generate a large amount of random data.
- [jekyll-firstimage](https://github.com/nhoizey/jekyll-firstimage) adds a Liquid filter finding the first image in a HTML content string, including responsive images srcset.
#### Tags
@@ -940,6 +941,7 @@ You can find a few useful plugins at the following locations:
- [jekyll-pwa-plugin](https://github.com/lavas-project/jekyll-pwa): A plugin provides PWA support for Jekyll. It generates a service worker in Jekyll build process and makes precache and runtime cache available in the runtime with Google Workbox.
- [jekyll-algolia](https://community.algolia.com/jekyll-algolia/): Add fast and relevant search to your Jekyll site through the Algolia API.
- [jekyll-get](https://github.com/18F/jekyll-get): Download data from external JSON API sources to use in generating a site.
- [jekyll-xml-source](https://github.com/mcred/jekyll-xml-source): Download XML and RSS from external sites for use in site data.
<div class="note info">
<h5>Submit your gem plugins</h5>

View File

@@ -19,8 +19,8 @@ In the case of Minima, you see only the following files in your Jekyll site dire
├── _config.yml
├── _posts
│ └── 2016-12-04-welcome-to-jekyll.markdown
├── about.md
└── index.md
├── about.markdown
└── index.markdown
```
The `Gemfile` and `Gemfile.lock` files are used by Bundler to keep track of the required gems and gem versions you need to build your Jekyll site.
@@ -52,6 +52,8 @@ To locate a theme's files on your computer:
open $(bundle show minima)
# On Windows
explorer /usr/local/lib/ruby/gems/2.3.0/gems/minima-2.1.0
# On Linux
xdg-open $(bundle show minima)
```
A Finder or Explorer window opens showing the theme's files and directories. The Minima theme gem contains these files:
@@ -164,20 +166,21 @@ For example, search for [jekyll theme on RubyGems](https://rubygems.org/search?u
To install a gem-based theme:
1. Add the theme to your site's `Gemfile`:
1. Add the theme gem to your site's `Gemfile`:
```ruby
# ./Gemfile
gem "jekyll-theme-awesome"
# This is an example, declare the theme gem you want to use here
gem "jekyll-theme-minimal"
```
Or if you've started with the `jekyll new` command, replace `gem "minima", "~> 2.0"` with your theme-gem:
Or if you've started with the `jekyll new` command, replace `gem "minima", "~> 2.0"` with the gem you want, e.g:
```diff
# ./Gemfile
- gem "minima", "~> 2.0"
+ gem "jekyll-theme-awesome"
+ gem "jekyll-theme-minimal"
```
2. Install the theme:
@@ -189,7 +192,7 @@ To install a gem-based theme:
3. Add the following to your site's `_config.yml` to activate the theme:
```yaml
theme: jekyll-theme-awesome
theme: jekyll-theme-minimal
```
4. Build your site:
@@ -201,7 +204,7 @@ To install a gem-based theme:
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.
If you're publishing your Jekyll site on [GitHub Pages](https://pages.github.com/), note that GitHub Pages supports only [some gem-based themes](https://pages.github.com/themes/). GitHub Pages also supports [using any theme hosted on GitHub](https://help.github.com/articles/adding-a-jekyll-theme-to-your-github-pages-site/#adding-a-jekyll-theme-in-your-sites-_configyml-file) using the `remote_theme` configuration as if it were a gem-based theme.
## Creating a gem-based theme

View File

@@ -0,0 +1,28 @@
---
title: Upgrading from 3.x to 4.x
permalink: /docs/upgrading/3-to-4/
---
Upgrading from an older version of Jekyll? A few things have changed in Jekyll 4
that you'll want to know about.
Before we dive in, you need to have at least Ruby 2.3.0 installed. Run the following
in your terminal to check
```sh
ruby -v
```
If you're using Ruby >= 2.3.0, go ahead and fetch the latest version of Jekyll:
```sh
gem update jekyll
```
---
*Insert sections here*
---
*Did we miss something? Please click "Improve this page" above and add a section. Thanks!*