Open dziudek opened 5 years ago
No, the relative path needed to enable netlify cdn.
And I am using cdn for static assets (fonts, images, svgs, js, css ). And I don't enable them manually, it's automatic in netlify ( if you choose proper settings ).
Here is the Ghost storage adapter I've used for Cloudinary which worked perfectly for my needs. Perhaps there's some value to be had looking at that as a starting point. https://github.com/eexit/ghost-storage-cloudinary
When can we expect support for CDN?
OR alternatively can developers please provide or tell me how to modify static assets (js/CSS/fonts/images) URL path to custom CDN path.
Example: After sites rendering; the path of a CSS file is: domain.com/assets/css/style.css
To enable CDN, I need to change it to: cdn.domain.com/assets/css/style.css
BUT it is necessary that there is "style.css" in the following directory -> domain.com/assets/css/
So basically, I just need help to rewrite the URL for static assets after or while rendering.
I want to transfer 3 of my WordPress websites to publii, but I can not afford to sacrifice on website speed, and without CDN, I don't find any mean to keep all my site performant.
Please please help me with this.
Thanks!
Any help, please
@designgrande - at this moment the only way to make it working is to use @rendering.previewMode
global variable to create custom CSS/JS paths when website is rendered. So if previewMode is active - you render CSS/JS paths in the old way, but for the non-preview mode you use custom paths.
@dziudek Hi, I understood how to do it for CSS and JS (also thanks to docs: https://getpublii.com/dev/renderer-global-variable/) but how to achieve the same with images?
Any update on CDN implementation - I think it was requested back in Jan 2019. Not enforcing or anything, just that every other issue is resolved within months.
Regards.
Is there any improvement on this. Because SEO site checkers give warnings about it. If not images then at least there should be an option to load most common CSS/JS files from a CDN.
I think that this problem is still, applicable to this day. If I want to add my own domain to GitHub pages I need to change all the files manually. adding a check box for a domain will be amazing when pushing to Github pages because it will mess up the website
it won't find the CSS...
Here is the Ghost storage adapter I've used for Cloudinary which worked perfectly for my needs. Perhaps there's some value to be had looking at that as a starting point. https://github.com/eexit/ghost-storage-cloudinary
Ghost also has a an official Cloudinary integration: https://ghost.org/integrations/cloudinary/
ref. https://github.com/GetPublii/Publii/issues/271#issuecomment-454391795
We need to add an option to specify a domain for the assets (it would be good to specify separate domains for theme assets and media assets).