diff --git a/scripts/cloudinary.js b/scripts/cloudinary.js index 87512f5..e067aad 100644 --- a/scripts/cloudinary.js +++ b/scripts/cloudinary.js @@ -10,8 +10,8 @@ hexo.extend.tag.register('cloudinary', (args) => { const user = 'curben' - const fileName = args[0] - const alt = args[1] || '' + let [fileName, alt] = args + if (!alt) alt = '' let modern = '' let legacy = '' const link = 'https://cdn.statically.io/img/res.cloudinary.com/' + user