-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Allow absolute paths in public_folder
#1668
Comments
cool. fwiw i am still blocked and would love to see this merged. let me know if/when i can help. |
I'm stuck on this too. Our docs are hosted on a sub folder |
Agree on this one, we would like to have a staging site with Netlify on GitLab pages while the final public site will be on its own domain. My take so far is that I have replaced The code I add to my const CustomImagePreview = createClass({
render: function() {
var value = this.props.value;
var getAsset = this.props.getAsset;
var field = this.props.field;
var prefix = 'https://gitlab.com/<mygroup>/<myreponame>/raw/master/src/website/static';
var suffix = '?inline=false';
var uri = getAsset(value).public_path;
if(prefix && uri && uri.substring && uri.substring(0, 1) === '/') {
uri = prefix + uri + suffix;
}
var style = { maxWidth: '100%', height: 'auto' };
return uri ? h('div', { style: style },
h('img', { src: uri, role: 'presentation' })
) : null;
}
});
CMS.registerWidget("image", "image", CustomImagePreview); |
Maybe this will actually be solved by #990 |
That will help with image handling in the CMS, but image path output will still be prepended with |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@erezrokah how is this impacted by the updates in our image handling? |
I'm not sure I understand the use case for absolute paths in The only place the Regardless, I've tested setting an absolute URL as a |
Migrated from #1257 for discussion.
The text was updated successfully, but these errors were encountered: