@rmdes/indiekit-post-type-page 1.0.2 → 1.0.3
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/index.js +14 -7
- package/package.json +1 -2
- package/includes/post-types/page-field.njk +0 -7
package/index.js
CHANGED
|
@@ -9,12 +9,18 @@
|
|
|
9
9
|
|
|
10
10
|
const defaults = {
|
|
11
11
|
name: "Page",
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
|
|
12
|
+
// Use h: "page" for microformat type-based discovery
|
|
13
|
+
// This sets properties.type to "page" which survives mf2→JF2 conversion
|
|
14
|
+
h: "page",
|
|
15
|
+
// Root-level paths for slash pages (no dates in URL)
|
|
16
|
+
post: {
|
|
17
|
+
path: "{slug}.md",
|
|
18
|
+
url: "{slug}",
|
|
19
|
+
},
|
|
20
|
+
media: {
|
|
21
|
+
path: "media/pages/{filename}",
|
|
22
|
+
},
|
|
15
23
|
fields: {
|
|
16
|
-
// Hidden marker field - triggers post-type-discovery to identify as "page"
|
|
17
|
-
page: { required: true },
|
|
18
24
|
name: { required: true }, // Page title (e.g., "About", "Now", "Uses")
|
|
19
25
|
summary: {}, // Optional page description
|
|
20
26
|
content: { required: true }, // Page content
|
|
@@ -34,8 +40,9 @@ export default class PagePostType {
|
|
|
34
40
|
get config() {
|
|
35
41
|
return {
|
|
36
42
|
name: this.options.name,
|
|
37
|
-
h:
|
|
38
|
-
|
|
43
|
+
h: this.options.h,
|
|
44
|
+
post: this.options.post,
|
|
45
|
+
media: this.options.media,
|
|
39
46
|
fields: this.options.fields,
|
|
40
47
|
};
|
|
41
48
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-post-type-page",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Page post type for Indiekit - creates root-level slash pages like /about, /now, /uses",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"type": "module",
|
|
23
23
|
"main": "index.js",
|
|
24
24
|
"files": [
|
|
25
|
-
"includes",
|
|
26
25
|
"index.js"
|
|
27
26
|
],
|
|
28
27
|
"repository": {
|