docs-navigation.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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: "Changelog", href: "/docs/changelog" },
  18. ],
  19. },
  20. {
  21. title: "Core Concepts",
  22. items: [
  23. { title: "Specs", href: "/docs/specs" },
  24. { title: "Schemas", href: "/docs/schemas" },
  25. { title: "Catalog", href: "/docs/catalog" },
  26. { title: "Registry", href: "/docs/registry" },
  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: "Examples",
  34. items: [
  35. {
  36. title: "Dashboard",
  37. href: "https://github.com/vercel-labs/json-render/tree/main/examples/dashboard",
  38. external: true,
  39. },
  40. {
  41. title: "Remotion",
  42. href: "https://github.com/vercel-labs/json-render/tree/main/examples/remotion",
  43. external: true,
  44. },
  45. ],
  46. },
  47. {
  48. title: "Guides",
  49. items: [
  50. { title: "Custom Schema", href: "/docs/custom-schema" },
  51. { title: "Streaming", href: "/docs/streaming" },
  52. { title: "Code Export", href: "/docs/code-export" },
  53. ],
  54. },
  55. {
  56. title: "Integrations",
  57. items: [
  58. { title: "AI SDK", href: "/docs/ai-sdk" },
  59. { title: "A2UI", href: "/docs/a2ui" },
  60. { title: "Adaptive Cards", href: "/docs/adaptive-cards" },
  61. { title: "AG-UI", href: "/docs/ag-ui" },
  62. { title: "OpenAPI", href: "/docs/openapi" },
  63. ],
  64. },
  65. {
  66. title: "API Reference",
  67. items: [
  68. { title: "@json-render/core", href: "/docs/api/core" },
  69. { title: "@json-render/react", href: "/docs/api/react" },
  70. { title: "@json-render/remotion", href: "/docs/api/remotion" },
  71. { title: "@json-render/codegen", href: "/docs/api/codegen" },
  72. ],
  73. },
  74. ];
  75. // Flatten all pages for current page lookup (excludes external links)
  76. export const allDocsPages = docsNavigation.flatMap((section) =>
  77. section.items.filter((item) => !item.external),
  78. );