mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: deprecate static_url
This commit is contained in:
1 parent
a065084b11
commit
60fc805c84
4 files changed
+15
-13
No files matched your search
@@ -134,6 +134,7 @@ nunjucks.runtime.memberLookup = function memberLookup(obj, val) {
|
||||
};
|
||||
const env = new Nunjucks();
|
||||
env.addGlobal('static_url', (assetName) => {
|
||||
// DEPRECATED
|
||||
const cdnPrefix = process.env.DEV ? '/' : global.Hydro.model.system.get('server.cdn');
|
||||
return `${cdnPrefix}${assetName}`;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user