16bcaaf54b
Images can now go directly to media.snipettemag.com instead of being routed through the private Ghost instance. (Reduces traffic on that node).
11 lines
316 B
JavaScript
11 lines
316 B
JavaScript
const config = require('../../gridsome.config.js');
|
|
|
|
export default string => {
|
|
if (config.mediaUrlFrom && config.mediaUrlTo && string) {
|
|
var processedString = string.replace(new RegExp(config.mediaUrlFrom, 'g'), config.mediaUrlTo);
|
|
} else {
|
|
var processedString = string;
|
|
}
|
|
return processedString;
|
|
}
|