create-fumadocs-app 15.6.6 → 15.6.7

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.
@@ -59,7 +59,7 @@ async function tryGitInit(cwd2) {
59
59
  }
60
60
 
61
61
  // src/versions.js
62
- var versions = { "fumadocs-core": "15.6.6", "fumadocs-ui": "15.6.6", "fumadocs-mdx": "11.7.1", "@fumadocs/mdx-remote": "1.4.0", "@fumadocs/content-collections": "1.2.1" };
62
+ var versions = { "fumadocs-core": "15.6.7", "fumadocs-ui": "15.6.7", "fumadocs-mdx": "11.7.1", "@fumadocs/mdx-remote": "1.4.0", "@fumadocs/content-collections": "1.2.1" };
63
63
 
64
64
  // ../create-app-versions/package.json
65
65
  var package_default = {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  create,
3
3
  templates
4
- } from "./chunk-VLVSDHVS.js";
4
+ } from "./chunk-RFLPQS6Z.js";
5
5
  export {
6
6
  create,
7
7
  templates
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  getPackageManager,
6
6
  managers,
7
7
  templates
8
- } from "./chunk-VLVSDHVS.js";
8
+ } from "./chunk-RFLPQS6Z.js";
9
9
 
10
10
  // src/index.ts
11
11
  import fs from "fs/promises";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-fumadocs-app",
3
- "version": "15.6.6",
3
+ "version": "15.6.7",
4
4
  "description": "Create a new documentation site with Fumadocs",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -1,5 +1,23 @@
1
1
  import type { Config } from '@react-router/dev/config';
2
+ import { glob } from 'node:fs/promises';
3
+ import { createGetUrl, getSlugs } from 'fumadocs-core/source';
4
+
5
+ const getUrl = createGetUrl('/docs');
2
6
 
3
7
  export default {
4
8
  ssr: true,
9
+ async prerender({ getStaticPaths }) {
10
+ const paths: string[] = [];
11
+ for (const path of getStaticPaths()) {
12
+ // ignore dynamic document search
13
+ if (path === '/api/search') continue;
14
+ paths.push(path);
15
+ }
16
+
17
+ for await (const entry of glob('**/*.mdx', { cwd: 'content/docs' })) {
18
+ paths.push(getUrl(getSlugs(entry)));
19
+ }
20
+
21
+ return paths;
22
+ },
5
23
  } satisfies Config;