Sha256: 959986f50a6db0eddcf068d50f2c8e3ff4a474c5fac70cb4d09d8f1992474e03

Contents?: true

Size: 995 Bytes

Versions: 2

Compression:

Stored size: 995 Bytes

Contents

---
sort: 5
---

# CDN 

Use for images that are hosted at a different domain or subdomain than the
Jekyll site root. Overrides `relative_url`. 

## URL

*Format:* `cdn_url: (url)`

*Example:* `cdn_url: https://cdn.example.com`

*Default*: none

## Environments

It's likely that if you're using a CDN, you may not want to use it in your local
development environment. This allows you to build a site with local images while
in development, and still push to a CDN when you build for production by
specifying a different 
[environment](https://jekyllrb.com/docs/configuration/environments/). 

*Format:* `cdn_environments: (array of strings)`

*Example:* `cdn_environments: ['production', 'staging']`

*Default*: `['production']`

**Note that the default jekyll environment is `development`**, meaning that if
you only set `cdn_url` and run `jekyll serve` or `jekyll build`, nothing will
change. Either run `JEKYLL_ENV=production bundle exec jekyll build`, or add
`development` to this setting.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jekyll_picture_tag-1.13.0 docs/users/configuration/cdn.md
jekyll_picture_tag-1.12.0 docs/users/configuration/cdn.md