Skip to content

Commit

Permalink
fix: fix building static bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowusr committed Jun 9, 2024
1 parent 78e88c1 commit ea663f7
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 29 deletions.
3 changes: 2 additions & 1 deletion docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const config: Config = {
organizationName: "gemini-testing",
projectName: "testplane-docs",

onBrokenLinks: "throw",
// TODO: set to throw once we start adding actual docs pages
onBrokenLinks: "warn",
onBrokenMarkdownLinks: "warn",

i18n: {
Expand Down
18 changes: 18 additions & 0 deletions src/components/pages/LandingPage/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";
import { InstallationPromptSection } from "@site/src/components/pages/LandingPage/sections/installation-prompt";
import { AdditionalFeaturesSection } from "@site/src/components/pages/LandingPage/sections/additional-features";
import { CoreFeaturesSection } from "@site/src/components/pages/LandingPage/sections/core-features";
import { AnimatedDemoSection } from "@site/src/components/pages/LandingPage/sections/animated-demo";
import { LandingHeadSection } from "@site/src/components/pages/LandingPage/sections/landing-head";

export const LandingPage = () => {
return (
<>
<LandingHeadSection />
<AnimatedDemoSection />
<CoreFeaturesSection />
<AdditionalFeaturesSection />
<InstallationPromptSection />
</>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import { FeaturesDemo } from "@site/src/components/FeaturesDemo";
import { DemoStats } from "@site/src/components/DemoStats";
import React from "react";
import useBaseUrl from "@docusaurus/core/lib/client/exports/useBaseUrl";
import BrowserOnly from "@docusaurus/core/lib/client/exports/BrowserOnly";

export function AnimatedDemoSection() {
export const AnimatedDemoSection = () => {
const grainyBg = `linear-gradient(41deg, rgb(227 119 252) 0%, rgb(142 78 253) 100%), url(${useBaseUrl("/img/landing/noise.png")})`;

return (
Expand All @@ -19,7 +20,9 @@ export function AnimatedDemoSection() {
<Star4Sharp className="absolute right-2 top-[60%] size-16 rotate-[-20deg]" />
</div>
<div className="container mx-auto py-6">
<FeaturesDemo className="h-[75vh] 2xl:h-[800px]" />
<BrowserOnly>
{() => <FeaturesDemo className="h-[75vh] 2xl:h-[800px]" />}
</BrowserOnly>
<div className="flex justify-around pt-6">
<DemoStats value="5.6B" description="Tests launched" />
<DemoStats value="600+" description="Stars on GitHub" />
Expand All @@ -28,4 +31,4 @@ export function AnimatedDemoSection() {
</div>
</section>
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { GradientUnderline } from "@site/src/components/GradientUnderline";
import useBaseUrl from "@docusaurus/core/lib/client/exports/useBaseUrl";
import React from "react";

export function CoreFeaturesSection() {
export const CoreFeaturesSection = () => {
return (
<section className="bg-gray-100">
<div className="container max-w-screen-lg py-6">
Expand Down Expand Up @@ -94,4 +94,4 @@ export function CoreFeaturesSection() {
</div>
</section>
);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { AnimatedPlanet } from "@site/src/components/AnimatedPlanet";
import React from "react";
import { LinkBadge } from "@site/src/components/LinkBadge";

export function LandingHeadSection() {
export const LandingHeadSection = () => {
return (
<section className="overflow-hidden bg-gray-100">
<MobileBg className="absolute top-0 w-full sm:hidden" />
Expand Down Expand Up @@ -62,4 +62,4 @@ export function LandingHeadSection() {
</div>
</section>
);
}
};
18 changes: 0 additions & 18 deletions src/pages/LandingPage/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import { LandingPage } from "@site/src/pages/LandingPage";
import { LandingPage } from "@site/src/components/pages/LandingPage";

export default function Home() {
const { siteConfig } = useDocusaurusContext();
Expand Down
4 changes: 2 additions & 2 deletions src/theme/Footer/Links/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, {ReactNode} from "react";
import React, { ReactNode } from "react";

import { isMultiColumnFooterLinks } from "@docusaurus/theme-common";
import type { Props } from "@theme/Footer/Links";
import {FooterLinkItem} from "@site/src/theme/Footer/LinkItem";
import { FooterLinkItem } from "@site/src/theme/Footer/LinkItem";

export default function FooterLinks({ links }: Props): ReactNode {
if (!isMultiColumnFooterLinks(links)) {
Expand Down

0 comments on commit ea663f7

Please sign in to comment.