diff --git a/README.md b/README.md index 1b034f8..58a2d80 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ I give this plugin two :+1:! ## Emoji images -For GitHub Pages sites built on GitHub.com, emoji images are served from the GitHub.com CDN, with a base URL of `https://assets-cdn.github.com`, which results in emoji image URLs like `https://assets-cdn.github.com/images/icons/emoji/unicode/1f604.png`. +For GitHub Pages sites built on GitHub.com, emoji images are served from the GitHub.com CDN, with a base URL of `https://github.githubassets.com`, which results in emoji image URLs like `https://github.githubassets.com/images/icons/emoji/unicode/1f604.png`. On GitHub Enterprise installs, page builds receive the `ASSET_HOST_URL` environment variable, which contain a value like `https://assets.ghe.my-company.com`. This results in emoji images for GitHub Pages sites built on a GitHub Enterprise install being served at URLs like `https://assets.ghe.my-company.com/images/icons/emoji/unicode/1f604.png`. diff --git a/lib/jemoji.rb b/lib/jemoji.rb index 230e8b6..62a78ad 100644 --- a/lib/jemoji.rb +++ b/lib/jemoji.rb @@ -6,7 +6,7 @@ module Jekyll class Emoji - GITHUB_DOT_COM_ASSET_HOST_URL = "https://assets-cdn.github.com" + GITHUB_DOT_COM_ASSET_HOST_URL = "https://github.githubassets.com" ASSET_PATH = "/images/icons/" BODY_START_TAG = "\s*!.freeze @@ -25,7 +25,7 @@ def emojify(doc) # Public: Create or fetch the filter for the given {{src}} asset root. # - # src - the asset root URL (e.g. https://assets-cdn.github.com/images/icons/) + # src - the asset root URL (e.g. https://github.githubassets.com/images/icons/) # # Returns an HTML::Pipeline instance for the given asset root. def filter_with_emoji(src) diff --git a/spec/fixtures/index.html b/spec/fixtures/index.html index b2ad5d9..3804854 100644 --- a/spec/fixtures/index.html +++ b/spec/fixtures/index.html @@ -7,7 +7,7 @@ -

:+1:

+

:+1:

diff --git a/spec/fixtures/index_without_body_attributes.html b/spec/fixtures/index_without_body_attributes.html index 2f40a01..a4cb004 100644 --- a/spec/fixtures/index_without_body_attributes.html +++ b/spec/fixtures/index_without_body_attributes.html @@ -7,7 +7,7 @@ -

:+1:

+

:+1:

diff --git a/spec/fixtures/minified_index.html b/spec/fixtures/minified_index.html index f8149aa..4ddc375 100644 --- a/spec/fixtures/minified_index.html +++ b/spec/fixtures/minified_index.html @@ -1,2 +1,2 @@ -Jemoji Minified

:+1:

+Jemoji Minified

:+1:

diff --git a/spec/fixtures/minified_index_without_body_attributes.html b/spec/fixtures/minified_index_without_body_attributes.html index 149bb4f..88ae846 100644 --- a/spec/fixtures/minified_index_without_body_attributes.html +++ b/spec/fixtures/minified_index_without_body_attributes.html @@ -1,2 +1,2 @@ -Plain Jemoji Minified

:+1:

+Plain Jemoji Minified

:+1:

diff --git a/spec/jemoji_spec.rb b/spec/jemoji_spec.rb index f95cf55..248f791 100644 --- a/spec/jemoji_spec.rb +++ b/spec/jemoji_spec.rb @@ -16,7 +16,7 @@ end let(:emoji) { described_class } let(:site) { Jekyll::Site.new(configs) } - let(:default_src) { "https://assets-cdn.github.com/images/icons/" } + let(:default_src) { "https://github.githubassets.com/images/icons/" } let(:result) do <<-STR.strip :+1: