diff --git a/scripts/cloudinary.js b/scripts/cloudinary.js index aa291b1..5728945 100644 --- a/scripts/cloudinary.js +++ b/scripts/cloudinary.js @@ -10,7 +10,7 @@ hexo.extend.tag.register('cloudinary', (args) => { const user = 'curben' - let fileName = args[0] + const fileName = args[0] const alt = args[1] || '' let modern = '' let legacy = '' @@ -26,37 +26,36 @@ hexo.extend.tag.register('cloudinary', (args) => { legacy = fileName } - fileName += '?auto_format=false' - modern += '?auto_format=false' - legacy += '?auto_format=false' + const modernLink = link + '/' + modern + '?auto_format=false' + const legacyLink = link + '/' + legacy + '?auto_format=false' const img = `${alt}` if (fileName.endsWith('.png') || fileName.endsWith('.webp')) { - return ` - ` + ` } else { - return `` + return `${img}` } }) diff --git a/themes/typing/layout/_partial/head.ejs b/themes/typing/layout/_partial/head.ejs index abc4236..2047e3d 100644 --- a/themes/typing/layout/_partial/head.ejs +++ b/themes/typing/layout/_partial/head.ejs @@ -1,6 +1,5 @@ - <%- metaGenerator() %> <% let title = page.title @@ -23,6 +22,7 @@ %> <% if (title) { %><%= title %> | <% } %><%= config.title %> + <%- metaGenerator() %> <%/* Add Open Graph meta tags for easier sharing on social networking sites */%> <%/* Modified from original source for compatibility with my blog */%> <%- openGraph() %>