@cocreate/sitemap
Advanced tools
Comparing version 1.2.3 to 1.2.4
@@ -0,1 +1,8 @@ | ||
## [1.2.4](https://github.com/CoCreate-app/CoCreate-sitemap/compare/v1.2.3...v1.2.4) (2024-09-09) | ||
### Bug Fixes | ||
* undefined changefreq ([a41333f](https://github.com/CoCreate-app/CoCreate-sitemap/commit/a41333f4fa65b18a531a0889211c4a9a04d040ab)) | ||
## [1.2.3](https://github.com/CoCreate-app/CoCreate-sitemap/compare/v1.2.2...v1.2.3) (2024-09-08) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@cocreate/sitemap", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"description": "A simple sitemap component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -102,3 +102,3 @@ /******************************************************************************** | ||
if (file.sitemap.type !== 'news') { | ||
if (file.sitemap.type !== 'news' && file.sitemap.type !== 'image' && file.sitemap.type !== 'video') { | ||
if (!file.sitemap.changefreq) | ||
@@ -111,2 +111,5 @@ file.sitemap.changefreq = 'monthly'; | ||
} | ||
} else { | ||
delete file.sitemap.changefreq | ||
delete file.sitemap.priority | ||
} | ||
@@ -457,7 +460,7 @@ } | ||
if (file.sitemap.type !== 'news') { | ||
if (file.sitemap.type !== 'news' && file.sitemap.type !== 'image' && file.sitemap.type !== 'video') { | ||
const priorityMeta = dom.querySelector('meta[name="sitemap-priority"]'); | ||
const changefreqMeta = dom.querySelector('meta[name="sitemap-changefreq"]'); | ||
file.sitemap.priority = priorityMeta ? priorityMeta.getAttribute('content') : file.sitemap.priority; // Default priority if not specified | ||
file.sitemap.changefreq = changefreqMeta ? changefreqMeta.getAttribute('content') : file.sitemap.changefreq; // Default changefreq if not specified | ||
file.sitemap.changefreq = changefreqMeta ? changefreqMeta.getAttribute('content') : file.sitemap.changefreq || 'monthly'; // Default changefreq if not specified | ||
} | ||
@@ -464,0 +467,0 @@ |
83765
439