From 904cf19ad76bf1998308a10b53e74e6ca06f7fbf Mon Sep 17 00:00:00 2001 From: melindafekete Date: Fri, 9 May 2025 12:39:14 +0200 Subject: [PATCH] Remove first batch of generated index pages --- website/docs/api-overview.mdx | 11 + .../react/implementing-feature-flags.mdx | 1 + .../use-cases/gradual-rollout.md | 1 + .../{concepts => }/what-is-a-feature-flag.mdx | 3 +- .../understanding-unleash/unleash-overview.md | 1 + website/sidebars.ts | 188 ++++++++---------- website/src/components/Homepage/APICards.tsx | 53 +++++ .../src/components/Homepage/APIContent.tsx | 14 ++ website/src/components/Homepage/index.ts | 2 + .../DocSidebar/Desktop/Content/index.tsx | 12 +- website/vercel.json | 35 ++++ 11 files changed, 206 insertions(+), 115 deletions(-) create mode 100644 website/docs/api-overview.mdx rename website/docs/topics/{concepts => }/what-is-a-feature-flag.mdx (98%) create mode 100644 website/src/components/Homepage/APICards.tsx create mode 100644 website/src/components/Homepage/APIContent.tsx diff --git a/website/docs/api-overview.mdx b/website/docs/api-overview.mdx new file mode 100644 index 0000000000..4ab86a5af2 --- /dev/null +++ b/website/docs/api-overview.mdx @@ -0,0 +1,11 @@ +--- +title: Unleash Documentation +description: "Unleash is the largest open-source feature management platform. In our documentation, you’ll find everything from core Unleash concepts and feature flag best practices to detailed SDK and API guides—giving you all the resources you need to get the most out of Unleash." +displayed_sidebar: documentation +--- + +import { APIContent, APICards } from "@site/src/components/Homepage/"; + + + + diff --git a/website/docs/feature-flag-tutorials/react/implementing-feature-flags.mdx b/website/docs/feature-flag-tutorials/react/implementing-feature-flags.mdx index 57cacfbaa0..df6f40a916 100644 --- a/website/docs/feature-flag-tutorials/react/implementing-feature-flags.mdx +++ b/website/docs/feature-flag-tutorials/react/implementing-feature-flags.mdx @@ -1,6 +1,7 @@ --- title: How to Implement Feature Flags in React slug: /feature-flag-tutorials/react +pagination_next: feature-flag-tutorials/react/examples --- import VideoContent from '@site/src/components/VideoContent.jsx'; diff --git a/website/docs/feature-flag-tutorials/use-cases/gradual-rollout.md b/website/docs/feature-flag-tutorials/use-cases/gradual-rollout.md index 448799745f..59d4f09f72 100644 --- a/website/docs/feature-flag-tutorials/use-cases/gradual-rollout.md +++ b/website/docs/feature-flag-tutorials/use-cases/gradual-rollout.md @@ -1,6 +1,7 @@ --- title: How to Perform a Gradual Rollout slug: /feature-flag-tutorials/use-cases/gradual-rollout +pagination_next: feature-flag-tutorials/use-cases/a-b-testing --- ## What is a Gradual Rollout? diff --git a/website/docs/topics/concepts/what-is-a-feature-flag.mdx b/website/docs/topics/what-is-a-feature-flag.mdx similarity index 98% rename from website/docs/topics/concepts/what-is-a-feature-flag.mdx rename to website/docs/topics/what-is-a-feature-flag.mdx index 2f02f55730..0d7f17e653 100644 --- a/website/docs/topics/concepts/what-is-a-feature-flag.mdx +++ b/website/docs/topics/what-is-a-feature-flag.mdx @@ -2,6 +2,7 @@ title: What is a feature flag and why are feature flags used? slug: /what-is-a-feature-flag description: Feature flags let you control software features in real time, enabling safer deployments, better testing, and faster innovation. +pagination_next: topics/feature-flags/feature-flag-best-practices --- Feature flags allow you to release, test, and manage features and functionality across your application without changing the source code. Organizations use added control and flexibility to deliver more and higher quality features with reduced cost, time, and risk. @@ -56,7 +57,7 @@ Moreover, feature flags enable quick mitigation of issues by allowing teams to i Feature flags significantly accelerate operational release cycles by enabling rapid release, testing, and rollback of features. This speed allows teams to adopt a more action-oriented and experimental approach, quickly iterating on new ideas without the risk of complex code integrations or burdensome deployments. Even when multiple teams are working on overlapping components of complex applications, feature flags streamline the process by reducing dependencies and conflicts. -Additionally, automated feature flags can [dynamically enable or disable features based on user behavior or system events](../../reference/actions.md), further speeding up the adaptation process. By embracing a CI/CD (continuous integration and continuous deployment) workflow with feature flags, teams can deliver improvements to their applications more frequently and reliably, ensuring a faster, more agile development cycle. +Additionally, automated feature flags can [dynamically enable or disable features based on user behavior or system events](/reference/actions.md), further speeding up the adaptation process. By embracing a CI/CD (continuous integration and continuous deployment) workflow with feature flags, teams can deliver improvements to their applications more frequently and reliably, ensuring a faster, more agile development cycle. ### Enable testing and experimenting diff --git a/website/docs/understanding-unleash/unleash-overview.md b/website/docs/understanding-unleash/unleash-overview.md index 8e7bb96966..9cceae135a 100644 --- a/website/docs/understanding-unleash/unleash-overview.md +++ b/website/docs/understanding-unleash/unleash-overview.md @@ -1,5 +1,6 @@ --- title: Unleash architecture +pagination_next: understanding-unleash/the-anatomy-of-unleash --- Unleash is designed for privacy, speed, and resilience, enabling feature flag evaluations to occur locally within your applications. The architecture provides: diff --git a/website/sidebars.ts b/website/sidebars.ts index a27f31ee5f..ef44659f6f 100644 --- a/website/sidebars.ts +++ b/website/sidebars.ts @@ -42,31 +42,24 @@ const sidebars: SidebarsConfig = { label: 'Feature Flags Developer Guide', type: 'category', link: { - type: 'generated-index', - title: 'Feature Flag Developer Guide', - description: - 'What are feature flags? And other concepts to get you started.', - slug: '/topics', + type: 'doc', + id: 'topics/what-is-a-feature-flag', }, items: [ - { - label: 'Feature Flag Concepts', - collapsed: true, - type: 'category', - items: ['topics/concepts/what-is-a-feature-flag'], - }, { label: 'Feature Flag Best Practices', collapsed: true, type: 'category', link: { - type: 'generated-index', - title: 'Feature Flag Best Practices', - description: - 'Principles and recommendations for best practices of using feature flags.', - slug: 'topics/feature-flags/', + type: 'doc', + id: 'topics/what-is-a-feature-flag', }, items: [ + { + type: 'doc', + label: 'What is a feature flag', + id: 'topics/what-is-a-feature-flag', + }, { type: 'doc', label: 'Building and scaling feature flag systems', @@ -89,21 +82,17 @@ const sidebars: SidebarsConfig = { type: 'category', collapsed: true, link: { - type: 'generated-index', - title: 'Feature Flag Tutorials', - description: - 'Tutorials to implement feature flags with your framework.', - slug: 'feature-flag-tutorials', - }, + type: 'doc', + id: 'feature-flag-tutorials/use-cases/gradual-rollout', + }, items: [ { type: 'category', label: 'Use Cases', collapsed: true, link: { - type: 'generated-index', - title: 'Use Cases', - slug: 'use-cases', + type: 'doc', + id: 'feature-flag-tutorials/use-cases/gradual-rollout', }, items: [ { @@ -148,9 +137,8 @@ const sidebars: SidebarsConfig = { label: 'Languages and Frameworks', collapsed: true, link: { - type: 'generated-index', - title: 'Languages and Frameworks', - slug: 'languages-and-frameworks', + type: 'doc', + id: 'feature-flag-tutorials/react/implementing-feature-flags', }, items: [ { @@ -168,6 +156,26 @@ const sidebars: SidebarsConfig = { }, ], }, + { + type: 'category', + label: 'Java', + link: { + type: 'doc', + id: 'feature-flag-tutorials/java/implementing-feature-flags', + }, + items: [ + { + type: 'doc', + label: 'Spring Boot', + id: 'feature-flag-tutorials/java/spring-boot-implementing-feature-flags', + }, + { + type: 'doc', + label: 'Spring Boot Examples', + id: 'feature-flag-tutorials/java/spring-boot-examples', + }, + ], + }, { type: 'category', label: 'Python', @@ -194,49 +202,9 @@ const sidebars: SidebarsConfig = { ], }, { - type: 'category', - label: 'Java', - link: { - type: 'doc', - id: 'feature-flag-tutorials/java/implementing-feature-flags', - }, - items: [ - { - type: 'doc', - label: 'Spring Boot', - id: 'feature-flag-tutorials/java/spring-boot-implementing-feature-flags', - }, - { - type: 'doc', - label: 'Spring Boot Examples', - id: 'feature-flag-tutorials/java/spring-boot-examples', - }, - ], - }, - { - type: 'category', - label: 'Ruby', - link: { - type: 'doc', - id: 'feature-flag-tutorials/ruby/implementing-feature-flags-ruby', - }, - items: [ - { - type: 'doc', - label: 'Ruby Examples', - id: 'feature-flag-tutorials/ruby/ruby-examples', - }, - { - type: 'doc', - label: 'Rails Tutorial', - id: 'feature-flag-tutorials/rails/implementing-feature-flags-rails', - }, - { - type: 'doc', - label: 'Rails Examples', - id: 'feature-flag-tutorials/rails/rails-examples', - }, - ], + type: 'doc', + label: 'Next.js', + id: 'feature-flag-tutorials/nextjs/implementing-feature-flags-nextjs', }, { type: 'category', @@ -253,6 +221,11 @@ const sidebars: SidebarsConfig = { }, ], }, + { + type: 'doc', + label: 'JavaScript', + id: 'feature-flag-tutorials/javascript/implementing-feature-flags-js', + }, { type: 'category', label: '.NET', @@ -283,6 +256,11 @@ const sidebars: SidebarsConfig = { }, ], }, + { + type: 'doc', + label: 'Serverless', + id: 'feature-flag-tutorials/serverless/implementing-feature-flags-in-aws-lambda', + }, { type: 'category', label: 'Rust', @@ -298,31 +276,41 @@ const sidebars: SidebarsConfig = { }, ], }, - { - type: 'doc', - label: 'JavaScript', - id: 'feature-flag-tutorials/javascript/implementing-feature-flags-js', - }, - { - type: 'doc', - label: 'Serverless', - id: 'feature-flag-tutorials/serverless/implementing-feature-flags-in-aws-lambda', - }, { type: 'doc', label: 'Flutter', id: 'feature-flag-tutorials/flutter/a-b-testing', }, - { - type: 'doc', - label: 'Next.js', - id: 'feature-flag-tutorials/nextjs/implementing-feature-flags-nextjs', - }, { type: 'doc', label: 'SvelteKit', id: 'feature-flag-tutorials/sveltekit/implementing-feature-flags-sveltekit', }, + { + type: 'category', + label: 'Ruby', + link: { + type: 'doc', + id: 'feature-flag-tutorials/ruby/implementing-feature-flags-ruby', + }, + items: [ + { + type: 'doc', + label: 'Ruby Examples', + id: 'feature-flag-tutorials/ruby/ruby-examples', + }, + { + type: 'doc', + label: 'Rails Tutorial', + id: 'feature-flag-tutorials/rails/implementing-feature-flags-rails', + }, + { + type: 'doc', + label: 'Rails Examples', + id: 'feature-flag-tutorials/rails/rails-examples', + }, + ], + }, ], }, ], @@ -335,11 +323,8 @@ const sidebars: SidebarsConfig = { collapsed: false, type: 'category', link: { - type: 'generated-index', - title: 'Understanding Unleash', - description: - 'Documentation on how Unleash works, high-level architecture and important concepts.', - slug: 'understanding-unleash', + type: 'doc', + id: 'understanding-unleash/unleash-overview', }, items: [ 'understanding-unleash/unleash-overview', @@ -350,11 +335,8 @@ const sidebars: SidebarsConfig = { { type: 'category', link: { - type: 'generated-index', - title: 'Unleash Concepts', - description: - 'Documents describing the inner parts of Unleash.', - slug: '/reference', + type: 'doc', + id: 'reference/projects', }, label: 'Unleash Concepts', items: [ @@ -474,11 +456,8 @@ const sidebars: SidebarsConfig = { collapsed: false, type: 'category', link: { - type: 'generated-index', - title: 'Using Unleash', - description: - 'Documentation on how to accomplish specific tasks when building with Unleash, including API and SDK documentation.', - slug: '/using-unleash', + type: 'doc', + id: 'api-overview', }, items: [ { @@ -486,11 +465,8 @@ const sidebars: SidebarsConfig = { collapsed: true, type: 'category', link: { - title: 'Unleash Server APIs', - type: 'generated-index', - description: - 'Generated API docs based on the Unleash OpenAPI schema.', - slug: '/reference/api/unleash', + type: 'doc', + id: 'api-overview', }, items: [ docsSidebar, diff --git a/website/src/components/Homepage/APICards.tsx b/website/src/components/Homepage/APICards.tsx new file mode 100644 index 0000000000..11faf1c7cc --- /dev/null +++ b/website/src/components/Homepage/APICards.tsx @@ -0,0 +1,53 @@ +import styles from './cards.module.css'; +import QuickstartIcon from './icons/quickstart.svg'; +import TutorialsIcon from './icons/tutorials.svg'; +import SdksIcon from './icons/sdks.svg'; +import AcademyIcon from './icons/academy.svg'; +import IntegrationsIcon from './icons/integrations.svg'; +import GetInTouchIcon from './icons/get-in-touch.svg'; + +const cardsData = [ + { + title: 'Frontend API', + description: 'Get up and running with Unleash in less than 5 minutes.', + icon: , + href: '/quickstart', + }, + { + title: 'Client API', + description: + 'Explore best practices and step-by-step tutorials to help you integrate Unleash into your stack.', + icon: , + href: '/feature-flag-tutorials/use-cases/gradual-rollout', + }, + { + title: 'Admin API', + description: + 'With over 30 SDKs, we enable fast and secure feature flagging across all major programming languages.', + icon: , + href: '/reference/sdks', + }, +]; + +const APICards = () => { + return ( +
+ {cardsData.map((card, index) => ( + +
+
+
+ {card.icon} +

{card.title}

+
+ +

{card.description}

+
+
+
+ ))} +
+ ); +}; + +export default APICards; diff --git a/website/src/components/Homepage/APIContent.tsx b/website/src/components/Homepage/APIContent.tsx new file mode 100644 index 0000000000..31a2d92b44 --- /dev/null +++ b/website/src/components/Homepage/APIContent.tsx @@ -0,0 +1,14 @@ +import styles from './content.module.css'; +import VideoContent from '@site/src/components/VideoContent.jsx'; + +const APIContent = () => { + return ( +
+

+ We have APIs. +

+
+ ); +}; + +export default APIContent; diff --git a/website/src/components/Homepage/index.ts b/website/src/components/Homepage/index.ts index f7722b9e22..f88d0fea7c 100644 --- a/website/src/components/Homepage/index.ts +++ b/website/src/components/Homepage/index.ts @@ -1,2 +1,4 @@ export { default as Cards } from './HomepageCards'; export { default as Content } from './HomepageContent'; +export { default as APICards } from './APICards'; +export { default as APIContent } from './APIContent'; \ No newline at end of file diff --git a/website/src/theme/DocSidebar/Desktop/Content/index.tsx b/website/src/theme/DocSidebar/Desktop/Content/index.tsx index bac1a47d98..29e23bd559 100644 --- a/website/src/theme/DocSidebar/Desktop/Content/index.tsx +++ b/website/src/theme/DocSidebar/Desktop/Content/index.tsx @@ -1,20 +1,16 @@ import Content from '@theme-original/DocSidebar/Desktop/Content'; import type ContentType from '@theme/DocSidebar/Desktop/Content'; import type { WrapperProps } from '@docusaurus/types'; +import Link from '@docusaurus/Link'; type Props = WrapperProps; export default function ContentWrapper(props: Props): JSX.Element { return ( <> - -
- + +
+ ); diff --git a/website/vercel.json b/website/vercel.json index cf2644f1d1..11d45e978f 100644 --- a/website/vercel.json +++ b/website/vercel.json @@ -701,6 +701,21 @@ "destination": "/understanding-unleash/the-anatomy-of-unleash", "permanent": true }, + { + "source": "/understanding-unleash", + "destination": "/understanding-unleash/unleash-overview", + "permanent": true + }, + { + "source": "/reference", + "destination": "/reference/projects", + "permanent": true + }, + { + "source": "/using-unleash", + "destination": "/api-overview", + "permanent": true + }, { "source": "/tutorials/proxy-hosting", "destination": "/understanding-unleash/hosting-options", @@ -821,6 +836,26 @@ "destination": "/using-unleash/deploy/getting-started", "permanent": true }, + { + "source": "/topics", + "destination": "/topics/what-is-a-feature-flag", + "permanent": true + }, + { + "source": "/use-cases", + "destination": "/feature-flag-tutorials/use-cases/gradual-rollout", + "permanent": true + }, + { + "source": "/languages-and-frameworks", + "destination": "/feature-flag-tutorials/use-cases/gradual-rollout", + "permanent": true + }, + { + "source": "/feature-flag-tutorials", + "destination": "/feature-flag-tutorials/use-cases/gradual-rollout", + "permanent": true + }, { "source": "/reference/deploy/configuring-unleash", "destination": "/using-unleash/deploy/configuring-unleash",