-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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 remote support in resources.Get #5255
Comments
I agree about the use case, and it has been discussed, and I guess it will eventually be implemented. But we have a fairly big API as it is, so I don't think we're going to add special {{ $externalCSS := resources.Get "https://fonts.googleapis.com/css?family=Space+Mono:400,700" }}
<style>
{{ $externalCSS.Content | safeCSS }} Or .RelPermalink would also work.
</style> Which would work like you would expect it to. There may be licensing issues with the above construct, but I'm not sure Hugo should be the gatekeeper of those problems. |
Ya that'll be fine too |
I can also add to the above that I would also love to, eventually, move |
It'll let developers use inline CSS as in the example below: ``` {{ $externalCSS := resources.Get "https://fonts.googleapis.com/css?family=Space+Mono:400,700" }} <style> {{ $externalCSS.Content | safeCSS }} Or .RelPermalink would also work. </style> ``` Closes gohugoio#5255
It'll let developers use inline CSS as in the example below: ``` {{ $externalCSS := resources.Get "https://fonts.googleapis.com/css?family=Space+Mono:400,700" }} <style> {{ $externalCSS.Content | safeCSS }} Or .RelPermalink would also work. </style> ``` Closes gohugoio#5255
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help. |
Closes gohugoio#5255 Supports gohugoio#9044
Closes gohugoio#5255 Supports gohugoio#9044
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
It'll be nice to have a
getCSS
function for external URL where the caching are not in our hands and also if we want to make the CSS an inline version instead of adding a link to the external site. Maybe by doing something like:The text was updated successfully, but these errors were encountered: