@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.
@@ -1,3 +1,4 @@
1
1
  export * from './docsConfigToRss.js';
2
2
  export * from './mdxToRssUpdates.js';
3
3
  export * from './pageToRss.js';
4
+ export * from './pathToRss.js';
@@ -1,3 +1,4 @@
1
1
  export * from './docsConfigToRss.js';
2
2
  export * from './mdxToRssUpdates.js';
3
3
  export * from './pageToRss.js';
4
+ export * from './pathToRss.js';
@@ -1,6 +1,6 @@
1
1
  import { getTags, isUpdate } from '@mintlify/common';
2
2
  export const mdxToRssUpdates = (tree) => {
3
- const updates = [];
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;
@@ -0,0 +1,3 @@
1
+ export const pathToRss = (path) => {
2
+ return path.replace('src/_props/', '').replace('.mdx', '/rss.xml');
3
+ };
@@ -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.replace('.mdx', '/rss');
12
+ const rssPath = pathToRss(targetPath);
12
13
  const updates = mdxToRssUpdates(tree);
13
14
  return {
14
15
  rssPath,