@rmdes/indiekit-endpoint-rss 1.2.3 → 1.2.4
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/controllers/dashboard.js +11 -1
- package/package.json +1 -1
- package/views/rss.njk +2 -1
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
resetPublishState,
|
|
4
4
|
rewindWatermark,
|
|
5
5
|
} from "../feed-settings.js";
|
|
6
|
+
import { defaultContent } from "../jf2-builder.js";
|
|
6
7
|
import { getSyncState, runSync } from "../sync.js";
|
|
7
8
|
import { formatFeed, formatItem } from "../utils.js";
|
|
8
9
|
|
|
@@ -93,7 +94,16 @@ export const dashboardController = {
|
|
|
93
94
|
|
|
94
95
|
response.render("rss", {
|
|
95
96
|
title: response.__("rss.title"),
|
|
96
|
-
feeds: feeds.map(
|
|
97
|
+
feeds: feeds.map((feed) => {
|
|
98
|
+
const formatted = formatFeed(feed);
|
|
99
|
+
return {
|
|
100
|
+
...formatted,
|
|
101
|
+
// Shown as the content field's placeholder. Leaving the field
|
|
102
|
+
// empty makes applyFeedSettings apply this same default, derived
|
|
103
|
+
// from the post type actually submitted.
|
|
104
|
+
contentDefault: defaultContent(formatted.publish?.postType),
|
|
105
|
+
};
|
|
106
|
+
}),
|
|
97
107
|
recentItems: recentItems.map((item) => formatItem(item)),
|
|
98
108
|
totalFeeds: feeds.length,
|
|
99
109
|
totalItems,
|
package/package.json
CHANGED
package/views/rss.njk
CHANGED
|
@@ -145,7 +145,8 @@
|
|
|
145
145
|
name: "content",
|
|
146
146
|
label: __("rss.publish.content"),
|
|
147
147
|
hint: __("rss.publish.contentHint"),
|
|
148
|
-
value: feed.publish.content
|
|
148
|
+
value: feed.publish.content,
|
|
149
|
+
attributes: { placeholder: feed.contentDefault }
|
|
149
150
|
}) }}
|
|
150
151
|
|
|
151
152
|
{{ input({
|