@rmdes/indiekit-endpoint-blogroll 1.0.24 → 1.0.25

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 CHANGED
@@ -8,6 +8,7 @@ import { sourcesController } from "./lib/controllers/sources.js";
8
8
  import { apiController } from "./lib/controllers/api.js";
9
9
  import { startSync, stopSync } from "./lib/sync/scheduler.js";
10
10
  import { waitForReady } from "@rmdes/indiekit-startup-gate";
11
+ import { BLOGROLL_BLOCKS } from "./lib/blocks.js";
11
12
 
12
13
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
13
14
 
@@ -55,6 +56,10 @@ export default class BlogrollEndpoint {
55
56
  };
56
57
  }
57
58
 
59
+ get blocks() {
60
+ return BLOGROLL_BLOCKS;
61
+ }
62
+
58
63
  /**
59
64
  * Protected routes (require authentication)
60
65
  * Admin dashboard and management
package/lib/blocks.js ADDED
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Blogroll v2 block declarations (Phase 7b — plugin block ownership).
3
+ *
4
+ * The `blogroll` and `feedland` sidebar widgets were site-config BUILTIN_BLOCKS
5
+ * seeds (requiresPlugin null, gated only by the theme's legacy
6
+ * widgetPluginRequirements render-map). Declaring them here makes site-config's
7
+ * scanPlugins stamp `sourcePlugin` → `requiresPlugin` ("Blogroll endpoint"), so
8
+ * the blocks are properly plugin-gated (theme ENDPOINT_SLUGS maps them to the
9
+ * `blogroll` loadout slug). scanPlugins precedence is `built-in < plugin blocks`,
10
+ * so these entries OVERWRITE the builtin seeds on sites where the plugin is
11
+ * loaded; the seeds themselves are removed from site-config in Phase 7d alongside
12
+ * the legacy-map bridge.
13
+ *
14
+ * Both are owned by this plugin: FeedLand is an alternate blogroll backend served
15
+ * by the same endpoint. Descriptors are byte-faithful to the BUILTIN_BLOCKS
16
+ * entries. Bespoke templates: the theme owns `components/widgets/blogroll.njk` and
17
+ * `components/widgets/feedland.njk` (no generic `render.renderer`);
18
+ * `data.source:"api"` documents the runtime fetch.
19
+ *
20
+ * @module lib/blocks
21
+ */
22
+
23
+ /** @type {Array<object>} */
24
+ export const BLOGROLL_BLOCKS = [
25
+ {
26
+ id: "blogroll",
27
+ version: 1,
28
+ label: "Blogroll",
29
+ description: "Blog recommendations",
30
+ icon: "list",
31
+ category: "social",
32
+ placement: { regions: ["sidebar"], surfaces: ["homepage"] },
33
+ multiple: false,
34
+ data: { source: "api" },
35
+ schema: { type: "object", additionalProperties: false, properties: {} },
36
+ },
37
+ {
38
+ id: "feedland",
39
+ version: 1,
40
+ label: "FeedLand",
41
+ description: "FeedLand blogroll widget",
42
+ icon: "rss",
43
+ category: "social",
44
+ placement: { regions: ["sidebar"], surfaces: ["homepage"] },
45
+ multiple: false,
46
+ data: { source: "api" },
47
+ schema: { type: "object", additionalProperties: false, properties: {} },
48
+ },
49
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rmdes/indiekit-endpoint-blogroll",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Blogroll endpoint for Indiekit. Aggregates blog feeds from OPML, JSON feeds, or manual entry.",
5
5
  "keywords": [
6
6
  "indiekit",