@rmdes/indiekit-endpoint-micropub 1.0.0-beta.25 → 1.0.0-beta.26
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.
|
@@ -8,11 +8,18 @@
|
|
|
8
8
|
export const getPostType = (postTypes, properties) => {
|
|
9
9
|
const propertiesMap = new Map(Object.entries(properties));
|
|
10
10
|
|
|
11
|
-
// If post has the event type, it
|
|
11
|
+
// If post has the event type, it's an event
|
|
12
12
|
if (properties.type && properties.type === "event") {
|
|
13
13
|
return properties.type;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
// If post has a custom type (h value) that matches a configured post type
|
|
17
|
+
// This allows plugins to use h: "page" or similar for type-based discovery
|
|
18
|
+
// instead of requiring a discovery property that survives mf2->JF2 conversion
|
|
19
|
+
if (properties.type && properties.type !== "entry" && postTypes[properties.type]) {
|
|
20
|
+
return properties.type;
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
const basePostTypes = new Map([
|
|
17
24
|
["rsvp", "rsvp"],
|
|
18
25
|
["repost", "repost-of"],
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rmdes/indiekit-endpoint-micropub",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
4
|
-
"description": "Micropub endpoint for Indiekit with
|
|
3
|
+
"version": "1.0.0-beta.26",
|
|
4
|
+
"description": "Micropub endpoint for Indiekit with custom type-based post discovery. Enables publishing content to your website using the Micropub protocol.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"indiekit",
|
|
7
7
|
"indiekit-plugin",
|