mirror of
https://github.com/Aroy-Art/Rinkusu.git
synced 2024-12-25 18:34:23 +01:00
Feature Request: Add CDN Support for Images and Fonts with Environment Variable Override #7
Labels
No labels
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Aroy/Rinkusu#7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description:
I would like to request the addition of CDN support for images and fonts in the Hugo theme, along with the ability to override the configuration parameters using environment variables. This feature will allow users to configure the use of a Content Delivery Network (CDN) for serving images and fonts, either through the
config.yaml
file or environment variables, making it flexible and suitable for deployment environments like Netlify.Rationale:
Integrating CDN support directly into the Hugo theme, with the option to override settings via environment variables, will greatly benefit users by improving website performance and load times. The environment variable support is especially useful for deployment platforms like Netlify, where configuration can be managed without modifying the repository files.
Use Cases:
Implementation Ideas:
Configurable CDN Option in
config.yaml
:config.yaml
file to enable or disable CDN usage.config.yaml
:CDN Image URL in Front Matter:
CDN_IMG_URL
field in the front matter of individual pages or posts.Environment Variable Override:
config.yaml
to be overridden by an environment variable.HUGO_PARAMS_CDN=true
Automatic URL Replacement:
config.yaml
or an environment variable), the theme should automatically replace default image and font URLs with their CDN counterparts.CDN_IMG_URL
is specified in the front matter, the theme uses this URL instead of the local image path.Fallback Mechanism:
Documentation:
config.yaml
file.CDN_IMG_URL
in front matter and best practices for CDN integration.HUGO_PARAMS_CDN
to override the configuration, particularly in deployment scenarios like Netlify.Additional Context:
Many Hugo theme users are concerned with website performance and flexibility, particularly when deploying on platforms like Netlify. Adding CDN support with environment variable overrides will help them achieve faster load times, better scalability, and more flexible configuration options. This feature aligns with modern web development practices and makes the theme more versatile for various deployment environments.
Example usage in a Hugo template:
Example Netlify Environment Variable: