@cocreate/sitemap 1.2.4 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.3.0](https://github.com/CoCreate-app/CoCreate-sitemap/compare/v1.2.4...v1.3.0) (2024-09-09)
2
+
3
+
4
+ ### Features
5
+
6
+ * file.sitemap boolean false will skip sitemap ([ea38ec3](https://github.com/CoCreate-app/CoCreate-sitemap/commit/ea38ec39e9567c4c70d47544834353360460d69e))
7
+
1
8
  ## [1.2.4](https://github.com/CoCreate-app/CoCreate-sitemap/compare/v1.2.3...v1.2.4) (2024-09-09)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/sitemap",
3
- "version": "1.2.4",
3
+ "version": "1.3.0",
4
4
  "description": "A simple sitemap component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "sitemap",
package/src/index.js CHANGED
@@ -32,8 +32,8 @@ class CoCreateSitemap {
32
32
  if (!file.sitemap && file['content-type'] !== 'text/html')
33
33
  return;
34
34
 
35
- // Ensure the file is public
36
- if (!file.public || file.public === "false")
35
+ // Ensure the file is public and is not sitemap false
36
+ if (file.sitemap === false || file.sitemap === 'false' || !file.public || file.public === "false")
37
37
  return;
38
38
 
39
39
  // Check if the file is HTML and contains a noindex meta or title tag