astro-accelerator-utils 0.3.46 → 0.3.48

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.
@@ -38,6 +38,12 @@ export function notAuthor(p: MarkdownInstance): boolean;
38
38
  * @returns {boolean}
39
39
  */
40
40
  export function isSearch(p: MarkdownInstance): boolean;
41
+ /**
42
+ * Predicate for whether a page is an search page
43
+ * @param {MarkdownInstance} p
44
+ * @returns {boolean}
45
+ */
46
+ export function notSearch(p: MarkdownInstance): boolean;
41
47
  /**
42
48
  * Predicate for whether a page has a modified date
43
49
  * @param {MarkdownInstance} p
@@ -66,14 +66,9 @@ export function isAuthor (p) {
66
66
  * @returns {boolean}
67
67
  */
68
68
  export function notAuthor (p) {
69
- if (p?.frontmatter?.layout?.indexOf('/Author.astro') < 0) {
70
- return true;
71
- }
72
-
73
- return false;
69
+ return !isAuthor(p);
74
70
  }
75
71
 
76
-
77
72
  /**
78
73
  * Predicate for whether a page is a search page
79
74
  * @param {MarkdownInstance} p
@@ -87,6 +82,15 @@ export function isSearch (p) {
87
82
  return false;
88
83
  }
89
84
 
85
+ /**
86
+ * Predicate for whether a page is an search page
87
+ * @param {MarkdownInstance} p
88
+ * @returns {boolean}
89
+ */
90
+ export function notSearch (p) {
91
+ return !isSearch(p);
92
+ }
93
+
90
94
  /**
91
95
  * Predicate for whether a page has a modified date
92
96
  * @param {MarkdownInstance} p
@@ -131,6 +135,10 @@ export function isListable (p) {
131
135
  return false;
132
136
  }
133
137
 
138
+ if (p.frontmatter.listable != null && p.frontmatter.listable == false) {
139
+ return false;
140
+ }
141
+
134
142
  if (p.frontmatter.draft == true) {
135
143
  return false;
136
144
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-accelerator-utils",
3
- "version": "0.3.46",
3
+ "version": "0.3.48",
4
4
  "description": "Astro utilities for Astro Accelerator.",
5
5
  "main": "index.mjs",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "homepage": "https://astro.stevefenton.co.uk/",
35
35
  "devDependencies": {
36
- "@types/node": "^22.15.34",
36
+ "@types/node": "^22.16.3",
37
37
  "jest": "^29.7.0",
38
38
  "jest-spec": "^0.0.6",
39
39
  "rehype-stringify": "^10.0.1",