@vercel/geistdocs 2.0.2 → 2.2.0

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.
Files changed (56) hide show
  1. package/dist/cli/index.js +1 -1
  2. package/dist/components/link.d.ts +5 -0
  3. package/dist/components/link.d.ts.map +1 -0
  4. package/dist/components/link.js +4 -0
  5. package/dist/internal/docs-link-class-name.d.ts +2 -0
  6. package/dist/internal/docs-link-class-name.d.ts.map +1 -0
  7. package/dist/internal/docs-link-class-name.js +3 -0
  8. package/dist/internal/page-tree-visibility.d.ts +4 -0
  9. package/dist/internal/page-tree-visibility.d.ts.map +1 -0
  10. package/dist/internal/page-tree-visibility.js +42 -0
  11. package/dist/page-visibility.d.ts +7 -0
  12. package/dist/page-visibility.d.ts.map +1 -1
  13. package/dist/pages/docs.d.ts +25 -21
  14. package/dist/pages/docs.d.ts.map +1 -1
  15. package/dist/pages/docs.js +53 -17
  16. package/dist/proxy.d.ts +4 -1
  17. package/dist/proxy.d.ts.map +1 -1
  18. package/dist/proxy.js +42 -12
  19. package/dist/routes/chat.d.ts +4 -1
  20. package/dist/routes/chat.d.ts.map +1 -1
  21. package/dist/routes/chat.js +58 -25
  22. package/dist/routes/llms.d.ts +14 -10
  23. package/dist/routes/llms.d.ts.map +1 -1
  24. package/dist/routes/llms.js +50 -8
  25. package/dist/routes/search-export.d.ts +3 -1
  26. package/dist/routes/search-export.d.ts.map +1 -1
  27. package/dist/routes/search-export.js +4 -3
  28. package/dist/routes/search.d.ts +3 -1
  29. package/dist/routes/search.d.ts.map +1 -1
  30. package/dist/routes/search.js +4 -3
  31. package/dist/routes/sitemap.d.ts +3 -2
  32. package/dist/routes/sitemap.d.ts.map +1 -1
  33. package/dist/routes/sitemap.js +7 -4
  34. package/dist/source.d.ts +1 -0
  35. package/dist/source.d.ts.map +1 -1
  36. package/docs/agents.md +1 -1
  37. package/docs/llms.txt +114 -3
  38. package/docs/manifest.json +1 -1
  39. package/docs/pages/configuration.md +53 -0
  40. package/docs/pages/getting-started.md +8 -0
  41. package/docs/pages/llms-txt.md +2 -0
  42. package/docs/pages/md.md +4 -0
  43. package/docs/pages/packages.md +6 -2
  44. package/docs/pages/proxy.md +14 -0
  45. package/docs/pages/syntax.md +26 -0
  46. package/package.json +5 -1
  47. package/template/AGENTS.md +2 -1
  48. package/template/app/styles/geistdocs.css +2 -2
  49. package/template/content/docs/configuration.mdx +53 -0
  50. package/template/content/docs/getting-started.mdx +9 -0
  51. package/template/content/docs/llms-txt.mdx +2 -0
  52. package/template/content/docs/md.mdx +4 -0
  53. package/template/content/docs/packages.mdx +6 -2
  54. package/template/content/docs/proxy.mdx +14 -0
  55. package/template/content/docs/syntax.mdx +26 -0
  56. package/template/package.json +1 -1
@@ -211,6 +211,32 @@ This renders as:
211
211
 
212
212
  Run independent requests in parallel with [`Promise.all`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all).
213
213
 
214
+ #### Force browser-native navigation
215
+
216
+ Normal internal links use Next.js navigation, while external links disable
217
+ prefetching automatically. A custom `createDocsPage` link resolver also
218
+ receives `nativeLink` for URLs that must always use a regular `<a>`, such as a
219
+ raw Markdown file or a production URL that should not be localized into a
220
+ preview deployment. It keeps the same Geistdocs link styling:
221
+
222
+ ```tsx
223
+ const docsPage = createDocsPage({
224
+ config,
225
+ source,
226
+ resolveLink: ({ link: Link, nativeLink: NativeLink }) =>
227
+ function ResolvedLink(props) {
228
+ const native =
229
+ props.href?.endsWith(".md") ||
230
+ props.href?.startsWith("https://example.com");
231
+
232
+ return native ? <NativeLink {...props} /> : <Link {...props} />;
233
+ },
234
+ });
235
+ ```
236
+
237
+ `NativeDocsLink` is also exported from the selected package's
238
+ `components/link` subpath for use outside `createDocsPage`.
239
+
214
240
  ### Images
215
241
 
216
242
  Add images with `![alt text](url)`:
@@ -17,7 +17,7 @@
17
17
  "@streamdown/code": "^1.0.1",
18
18
  "@vercel/agent-readability": "^0.7.0",
19
19
  "@vercel/analytics": "^1.6.1",
20
- "@vercel/geistdocs": "2.0.2",
20
+ "@vercel/geistdocs": "2.2.0",
21
21
  "@vercel/speed-insights": "^1.3.1",
22
22
  "ai": "^6.0.132",
23
23
  "clsx": "^2.1.1",