docs-navigation.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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: "Visibility", href: "/docs/visibility" },
  29. { title: "Validation", href: "/docs/validation" },
  30. ],
  31. },
  32. {
  33. title: "Rendering",
  34. items: [
  35. { title: "Registry", href: "/docs/registry" },
  36. { title: "Streaming", href: "/docs/streaming" },
  37. { title: "Generation Modes", href: "/docs/generation-modes" },
  38. ],
  39. },
  40. {
  41. title: "Examples",
  42. items: [
  43. {
  44. title: "Chat",
  45. href: "https://github.com/vercel-labs/json-render/tree/main/examples/chat",
  46. external: true,
  47. },
  48. {
  49. title: "Dashboard",
  50. href: "https://github.com/vercel-labs/json-render/tree/main/examples/dashboard",
  51. external: true,
  52. },
  53. {
  54. title: "React Native",
  55. href: "https://github.com/vercel-labs/json-render/tree/main/examples/react-native",
  56. external: true,
  57. },
  58. {
  59. title: "Remotion",
  60. href: "https://github.com/vercel-labs/json-render/tree/main/examples/remotion",
  61. external: true,
  62. },
  63. ],
  64. },
  65. {
  66. title: "Guides",
  67. items: [
  68. { title: "Custom Schema", href: "/docs/custom-schema" },
  69. { title: "Code Export", href: "/docs/code-export" },
  70. ],
  71. },
  72. {
  73. title: "Integrations",
  74. items: [
  75. { title: "AI SDK", href: "/docs/ai-sdk" },
  76. { title: "A2UI", href: "/docs/a2ui" },
  77. { title: "Adaptive Cards", href: "/docs/adaptive-cards" },
  78. { title: "AG-UI", href: "/docs/ag-ui" },
  79. { title: "OpenAPI", href: "/docs/openapi" },
  80. ],
  81. },
  82. {
  83. title: "API Reference",
  84. items: [
  85. { title: "@json-render/core", href: "/docs/api/core" },
  86. { title: "@json-render/react", href: "/docs/api/react" },
  87. { title: "@json-render/react-native", href: "/docs/api/react-native" },
  88. { title: "@json-render/remotion", href: "/docs/api/remotion" },
  89. { title: "@json-render/codegen", href: "/docs/api/codegen" },
  90. ],
  91. },
  92. ];
  93. // Flatten all pages for current page lookup (excludes external links)
  94. export const allDocsPages = docsNavigation.flatMap((section) =>
  95. section.items.filter((item) => !item.external),
  96. );