hexo-generator-sitemap icon indicating copy to clipboard operation
hexo-generator-sitemap copied to clipboard

Setting rel is not valid on configure

Open oneheed opened this issue 2 years ago • 0 comments

Site's header format is

<head>
<title>...</title>
</head>

rel is not valid

if format is

<head><title>...</title></head>

rel is valid


relSitemapInject()

data.replace(/<head>(?!<\/head>).+?<\/head>/, str => str.replace('</head>', `${relSitemap}</head>`));

modify

data.replace(/<head>(?!<\/head>)(.|\r|\n)+?<\/head>/, str => str.replace('</head>', `${relSitemap}</head>`));

oneheed avatar Nov 03 '21 08:11 oneheed