docs-navigation.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. export type NavItem = {
  2. title: string;
  3. href: string;
  4. external?: boolean;
  5. };
  6. export type NavSection = {
  7. title: string;
  8. items: NavItem[];
  9. };
  10. export const docsNavigation: NavSection[] = [
  11. {
  12. title: "Getting Started",
  13. items: [
  14. { title: "Introduction", href: "/docs" },
  15. { title: "Installation", href: "/docs/installation" },
  16. { title: "Quick Start", href: "/docs/quick-start" },
  17. { title: "Migration Guide", href: "/docs/migration" },
  18. { title: "Changelog", href: "/docs/changelog" },
  19. ],
  20. },
  21. {
  22. title: "Core",
  23. items: [
  24. { title: "Specs", href: "/docs/specs" },
  25. { title: "Schemas", href: "/docs/schemas" },
  26. { title: "Catalog", href: "/docs/catalog" },
  27. { title: "Data Binding", href: "/docs/data-binding" },
  28. { title: "Computed Values", href: "/docs/computed-values" },
  29. { title: "Visibility", href: "/docs/visibility" },
  30. { title: "Watchers", href: "/docs/watchers" },
  31. { title: "Validation", href: "/docs/validation" },
  32. ],
  33. },
  34. {
  35. title: "Rendering",
  36. items: [
  37. { title: "Renderers", href: "/docs/renderers" },
  38. { title: "Registry", href: "/docs/registry" },
  39. { title: "Streaming", href: "/docs/streaming" },
  40. { title: "Generation Modes", href: "/docs/generation-modes" },
  41. ],
  42. },
  43. {
  44. title: "Examples",
  45. items: [
  46. {
  47. title: "Chat",
  48. href: "https://github.com/vercel-labs/json-render/tree/main/examples/chat",
  49. external: true,
  50. },
  51. {
  52. title: "Dashboard",
  53. href: "https://github.com/vercel-labs/json-render/tree/main/examples/dashboard",
  54. external: true,
  55. },
  56. {
  57. title: "React Native",
  58. href: "https://github.com/vercel-labs/json-render/tree/main/examples/react-native",
  59. external: true,
  60. },
  61. {
  62. title: "React PDF",
  63. href: "https://github.com/vercel-labs/json-render/tree/main/examples/react-pdf",
  64. external: true,
  65. },
  66. {
  67. title: "React Email",
  68. href: "https://github.com/vercel-labs/json-render/tree/main/examples/react-email",
  69. external: true,
  70. },
  71. {
  72. title: "Remotion",
  73. href: "https://github.com/vercel-labs/json-render/tree/main/examples/remotion",
  74. external: true,
  75. },
  76. {
  77. title: "Image",
  78. href: "https://github.com/vercel-labs/json-render/tree/main/examples/image",
  79. external: true,
  80. },
  81. {
  82. title: "Svelte",
  83. href: "https://github.com/vercel-labs/json-render/tree/main/examples/svelte",
  84. external: true,
  85. },
  86. {
  87. title: "Vue",
  88. href: "https://github.com/vercel-labs/json-render/tree/main/examples/vue",
  89. external: true,
  90. },
  91. {
  92. title: "Renders with Vite (Vue / React / Svelte)",
  93. href: "https://github.com/vercel-labs/json-render/tree/main/examples/vite-renderers",
  94. external: true,
  95. },
  96. {
  97. title: "MCP App",
  98. href: "https://github.com/vercel-labs/json-render/tree/main/examples/mcp",
  99. external: true,
  100. },
  101. ],
  102. },
  103. {
  104. title: "Guides",
  105. items: [
  106. { title: "Custom Schema", href: "/docs/custom-schema" },
  107. { title: "Code Export", href: "/docs/code-export" },
  108. ],
  109. },
  110. {
  111. title: "Integrations",
  112. items: [
  113. { title: "AI SDK", href: "/docs/ai-sdk" },
  114. { title: "A2UI", href: "/docs/a2ui" },
  115. { title: "Adaptive Cards", href: "/docs/adaptive-cards" },
  116. { title: "AG-UI", href: "/docs/ag-ui" },
  117. { title: "OpenAPI", href: "/docs/openapi" },
  118. ],
  119. },
  120. {
  121. title: "API Reference",
  122. items: [
  123. { title: "@json-render/core", href: "/docs/api/core" },
  124. { title: "@json-render/react", href: "/docs/api/react" },
  125. { title: "@json-render/react-pdf", href: "/docs/api/react-pdf" },
  126. { title: "@json-render/react-email", href: "/docs/api/react-email" },
  127. { title: "@json-render/shadcn", href: "/docs/api/shadcn" },
  128. { title: "@json-render/react-native", href: "/docs/api/react-native" },
  129. { title: "@json-render/image", href: "/docs/api/image" },
  130. { title: "@json-render/remotion", href: "/docs/api/remotion" },
  131. { title: "@json-render/vue", href: "/docs/api/vue" },
  132. { title: "@json-render/svelte", href: "/docs/api/svelte" },
  133. { title: "@json-render/codegen", href: "/docs/api/codegen" },
  134. { title: "@json-render/mcp", href: "/docs/api/mcp" },
  135. ],
  136. },
  137. ];
  138. // Flatten all pages for current page lookup (excludes external links)
  139. export const allDocsPages = docsNavigation.flatMap((section) =>
  140. section.items.filter((item) => !item.external),
  141. );