@mintlify/prebuild 1.0.528 → 1.0.530
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/dist/prebuild/update/rss/index.d.ts +1 -0
- package/dist/prebuild/update/rss/index.js +1 -0
- package/dist/prebuild/update/rss/mdxToRssUpdates.js +4 -1
- package/dist/prebuild/update/rss/pathToRss.d.ts +1 -0
- package/dist/prebuild/update/rss/pathToRss.js +3 -0
- package/dist/prebuild/update/write/writeRssFiles.js +2 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getTags, isUpdate } from '@mintlify/common';
|
|
2
2
|
export const mdxToRssUpdates = (tree) => {
|
|
3
|
-
|
|
3
|
+
let updates = [];
|
|
4
4
|
const updateComponents = tree.children.filter((child) => isUpdate(child));
|
|
5
5
|
for (const updateComponent of updateComponents) {
|
|
6
6
|
const attributes = updateComponent.attributes;
|
|
@@ -18,5 +18,8 @@ export const mdxToRssUpdates = (tree) => {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
+
if (updates.length > 15) {
|
|
22
|
+
updates = updates.slice(0, 15);
|
|
23
|
+
}
|
|
21
24
|
return updates;
|
|
22
25
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pathToRss: (path: string) => string;
|
|
@@ -2,13 +2,14 @@ import fse from 'fs-extra';
|
|
|
2
2
|
import { docsConfigToRss } from '../rss/docsConfigToRss.js';
|
|
3
3
|
import { mdxToRssUpdates } from '../rss/mdxToRssUpdates.js';
|
|
4
4
|
import { pageToRss } from '../rss/pageToRss.js';
|
|
5
|
+
import { pathToRss } from '../rss/pathToRss.js';
|
|
5
6
|
export const writeRssFiles = async (docsConfig, rssPages) => {
|
|
6
7
|
const { orgName, orgDescription } = docsConfigToRss(docsConfig);
|
|
7
8
|
const rssTargetPath = 'src/_props/rssFiles.json';
|
|
8
9
|
const rssItemsToSave = rssPages.map((page) => {
|
|
9
10
|
const { targetPath, tree } = page;
|
|
10
11
|
const { title, description } = pageToRss(tree);
|
|
11
|
-
const rssPath = targetPath
|
|
12
|
+
const rssPath = pathToRss(targetPath);
|
|
12
13
|
const updates = mdxToRssUpdates(tree);
|
|
13
14
|
return {
|
|
14
15
|
rssPath,
|