-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for setting a default asset host URL in an ASSET_HOST_URL environment variable #45
Conversation
In a GitHub Enterprise environment, this allows the default asset host to be read from an ASSET_HOST_URL environment variable so that the GitHub.com CDN is not used by default.
@@ -4,7 +4,8 @@ | |||
|
|||
module Jekyll | |||
class Emoji | |||
GITHUB_DOT_COM_ASSET_ROOT = "https://assets.github.com/images/icons/".freeze | |||
GITHUB_DOT_COM_ASSET_HOST_URL = "https://assets.github.com".freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be assets or assets-cdn
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update this to https://assets-cdn.github.com
as part of this pull request too.
This points to the GitHub.com asset CDN rather than directly at GitHub hosts.
LGTM. Thanks for the PR, @jdennes! Would you mind adding some docs to the README about how to configure the asset host, including the requirement that the emoji be at the correct subpath? |
Specifically, describe how assets URLs are generated for different environments: GitHub.com uses the GitHub.com assets CDN, and GitHub Enterprise uses the base URL included in the ASSET_HOST_URL environment variable, which is set for the page build environment on the GitHub Enterprise install.
In 3756b57, I added an "Emoji images" section to the README (rendered), which describes how asset URLs are generated in different environments. I didn't include anything about Anyway, let me know what you think. |
Thanks, @jdennes! LGTM. |
@jekyllbot: merge |
This adds support for loading the default asset URL from an
ASSET_HOST_URL
environment variable. In a GitHub Enterprise environment, this supports fixing an issue where assets were being loaded from the GitHub.com rather asset host rather than using the GitHub Enterprise appliance's asset hostname.For review by @benbalter, @parkr, @jldec.