@cocreate/sitemap 1.2.4 → 1.4.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,22 @@
1
+ # [1.4.0](https://github.com/CoCreate-app/CoCreate-sitemap/compare/v1.3.0...v1.4.0) (2024-11-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * prettier.config options ([fcbcaa4](https://github.com/CoCreate-app/CoCreate-sitemap/commit/fcbcaa491d39934b63b9fd3fc20c8c069a9bb7df))
7
+
8
+
9
+ ### Features
10
+
11
+ * add prettier.config.js and format files ([f464417](https://github.com/CoCreate-app/CoCreate-sitemap/commit/f4644172fc854c9a4e59d8c9af82f0dd85cc3dc6))
12
+
13
+ # [1.3.0](https://github.com/CoCreate-app/CoCreate-sitemap/compare/v1.2.4...v1.3.0) (2024-09-09)
14
+
15
+
16
+ ### Features
17
+
18
+ * file.sitemap boolean false will skip sitemap ([ea38ec3](https://github.com/CoCreate-app/CoCreate-sitemap/commit/ea38ec39e9567c4c70d47544834353360460d69e))
19
+
1
20
  ## [1.2.4](https://github.com/CoCreate-app/CoCreate-sitemap/compare/v1.2.3...v1.2.4) (2024-09-09)
2
21
 
3
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/sitemap",
3
- "version": "1.2.4",
3
+ "version": "1.4.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",
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ tabWidth: 4,
3
+ semi: true,
4
+ trailingComma: "none",
5
+ bracketSameLine: true,
6
+ useTabs: true,
7
+ overrides: [
8
+ {
9
+ files: ["*.json", "*.yml", "*.yaml"],
10
+ options: {
11
+ tabWidth: 2,
12
+ useTabs: false
13
+ },
14
+ }
15
+ ],
16
+ };
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