astro-accelerator-utils 0.3.3 → 0.3.5
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/lib/postFiltering.d.mts +6 -0
- package/lib/postFiltering.mjs +13 -0
- package/package.json +44 -44
package/lib/postFiltering.d.mts
CHANGED
|
@@ -32,6 +32,12 @@ export function isAuthor(p: MarkdownInstance): boolean;
|
|
|
32
32
|
* @returns {boolean}
|
|
33
33
|
*/
|
|
34
34
|
export function isSearch(p: MarkdownInstance): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Predicate for whether a page has a modified date
|
|
37
|
+
* @param {MarkdownInstance} p
|
|
38
|
+
* @returns {boolean}
|
|
39
|
+
*/
|
|
40
|
+
export function hasModDate(p: MarkdownInstance): boolean;
|
|
35
41
|
/**
|
|
36
42
|
* Predicate for whether a page should be listed
|
|
37
43
|
* @param {MarkdownInstance<Record<string, any>>} p
|
package/lib/postFiltering.mjs
CHANGED
|
@@ -73,6 +73,19 @@ export function isSearch (p) {
|
|
|
73
73
|
return false;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* Predicate for whether a page has a modified date
|
|
78
|
+
* @param {MarkdownInstance} p
|
|
79
|
+
* @returns {boolean}
|
|
80
|
+
*/
|
|
81
|
+
export function hasModDate (p) {
|
|
82
|
+
if (p?.frontmatter?.modDate != null) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
|
|
76
89
|
/**
|
|
77
90
|
* Predicate for whether a page should be listed
|
|
78
91
|
* @param {MarkdownInstance<Record<string, any>>} p
|
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "astro-accelerator-utils",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Astro utilities for Astro Accelerator.",
|
|
5
|
-
"main": "index.mjs",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"packageManager": "pnpm@8.7.0",
|
|
8
|
-
"files": [
|
|
9
|
-
"index.mjs",
|
|
10
|
-
"index.d.mts",
|
|
11
|
-
"lib/*",
|
|
12
|
-
"types/*.d.ts"
|
|
13
|
-
],
|
|
14
|
-
"types": "index.d.mts",
|
|
15
|
-
"scripts": {
|
|
16
|
-
"types": "node ./clean.mjs && npx tsc index.mjs --allowJs --declaration --emitDeclarationOnly",
|
|
17
|
-
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --collectCoverage --runInBand"
|
|
18
|
-
},
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/Steve-Fenton/astro-accelerator-utils.git"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"astro",
|
|
25
|
-
"accelerator",
|
|
26
|
-
"ssg"
|
|
27
|
-
],
|
|
28
|
-
"author": "Steve Fenton",
|
|
29
|
-
"license": "Apache-2.0",
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/Steve-Fenton/astro-accelerator-utils/issues"
|
|
32
|
-
},
|
|
33
|
-
"homepage": "https://astro.stevefenton.co.uk/",
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/node": "^18.
|
|
36
|
-
"jest": "^29.
|
|
37
|
-
"jest-spec": "^0.0.3",
|
|
38
|
-
"rehype-stringify": "^9.0.
|
|
39
|
-
"remark-parse": "^10.0.
|
|
40
|
-
"remark-rehype": "^10.1.0",
|
|
41
|
-
"typescript": "^4.9.
|
|
42
|
-
"unified": "^10.1.2"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "astro-accelerator-utils",
|
|
3
|
+
"version": "0.3.5",
|
|
4
|
+
"description": "Astro utilities for Astro Accelerator.",
|
|
5
|
+
"main": "index.mjs",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"packageManager": "pnpm@8.7.0",
|
|
8
|
+
"files": [
|
|
9
|
+
"index.mjs",
|
|
10
|
+
"index.d.mts",
|
|
11
|
+
"lib/*",
|
|
12
|
+
"types/*.d.ts"
|
|
13
|
+
],
|
|
14
|
+
"types": "index.d.mts",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"types": "node ./clean.mjs && npx tsc index.mjs --allowJs --declaration --emitDeclarationOnly",
|
|
17
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --collectCoverage --runInBand"
|
|
18
|
+
},
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/Steve-Fenton/astro-accelerator-utils.git"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"astro",
|
|
25
|
+
"accelerator",
|
|
26
|
+
"ssg"
|
|
27
|
+
],
|
|
28
|
+
"author": "Steve Fenton",
|
|
29
|
+
"license": "Apache-2.0",
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/Steve-Fenton/astro-accelerator-utils/issues"
|
|
32
|
+
},
|
|
33
|
+
"homepage": "https://astro.stevefenton.co.uk/",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^18.19.3",
|
|
36
|
+
"jest": "^29.7.0",
|
|
37
|
+
"jest-spec": "^0.0.3",
|
|
38
|
+
"rehype-stringify": "^9.0.4",
|
|
39
|
+
"remark-parse": "^10.0.2",
|
|
40
|
+
"remark-rehype": "^10.1.0",
|
|
41
|
+
"typescript": "^4.9.5",
|
|
42
|
+
"unified": "^10.1.2"
|
|
43
|
+
}
|
|
44
|
+
}
|