docs-navigation.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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: "Registry", href: "/docs/registry" },
  38. { title: "Streaming", href: "/docs/streaming" },
  39. { title: "Generation Modes", href: "/docs/generation-modes" },
  40. ],
  41. },
  42. {
  43. title: "Examples",
  44. items: [
  45. {
  46. title: "Chat",
  47. href: "https://github.com/vercel-labs/json-render/tree/main/examples/chat",
  48. external: true,
  49. },
  50. {
  51. title: "Dashboard",
  52. href: "https://github.com/vercel-labs/json-render/tree/main/examples/dashboard",
  53. external: true,
  54. },
  55. {
  56. title: "React Native",
  57. href: "https://github.com/vercel-labs/json-render/tree/main/examples/react-native",
  58. external: true,
  59. },
  60. {
  61. title: "React PDF",
  62. href: "https://github.com/vercel-labs/json-render/tree/main/examples/react-pdf",
  63. external: true,
  64. },
  65. {
  66. title: "Remotion",
  67. href: "https://github.com/vercel-labs/json-render/tree/main/examples/remotion",
  68. external: true,
  69. },
  70. {
  71. title: "Vue",
  72. href: "https://github.com/vercel-labs/json-render/tree/main/examples/vue",
  73. external: true,
  74. },
  75. {
  76. title: "Renders with Vite (Vue / React)",
  77. href: "https://github.com/vercel-labs/json-render/tree/main/examples/vite-renderers",
  78. external: true,
  79. },
  80. ],
  81. },
  82. {
  83. title: "Guides",
  84. items: [
  85. { title: "Custom Schema", href: "/docs/custom-schema" },
  86. { title: "Code Export", href: "/docs/code-export" },
  87. ],
  88. },
  89. {
  90. title: "Integrations",
  91. items: [
  92. { title: "AI SDK", href: "/docs/ai-sdk" },
  93. { title: "A2UI", href: "/docs/a2ui" },
  94. { title: "Adaptive Cards", href: "/docs/adaptive-cards" },
  95. { title: "AG-UI", href: "/docs/ag-ui" },
  96. { title: "OpenAPI", href: "/docs/openapi" },
  97. ],
  98. },
  99. {
  100. title: "API Reference",
  101. items: [
  102. { title: "@json-render/core", href: "/docs/api/core" },
  103. { title: "@json-render/react", href: "/docs/api/react" },
  104. { title: "@json-render/react-pdf", href: "/docs/api/react-pdf" },
  105. { title: "@json-render/shadcn", href: "/docs/api/shadcn" },
  106. { title: "@json-render/react-native", href: "/docs/api/react-native" },
  107. { title: "@json-render/remotion", href: "/docs/api/remotion" },
  108. { title: "@json-render/vue", href: "/docs/api/vue" },
  109. { title: "@json-render/codegen", href: "/docs/api/codegen" },
  110. ],
  111. },
  112. ];
  113. // Flatten all pages for current page lookup (excludes external links)
  114. export const allDocsPages = docsNavigation.flatMap((section) =>
  115. section.items.filter((item) => !item.external),
  116. );