diff --git a/.gitignore b/.gitignore index 03659d8..af75bce 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ /public/sources-data.json /public/reviewers-data.json /public/light-transcripts.json +/public/transcripts-length.json # misc .DS_Store diff --git a/contentlayer.config.ts b/contentlayer.config.ts index cc4ebe2..8380db0 100644 --- a/contentlayer.config.ts +++ b/contentlayer.config.ts @@ -44,6 +44,10 @@ const getTranscriptAliases = (allTranscripts: ContentTranscriptType[]) => { fs.writeFileSync("./public/aliases.json", JSON.stringify(aliases)); }; +const getTranscriptsLength = (transcripts: ContentTranscriptType[]) => { + fs.writeFileSync("./public/transcripts-length.json", JSON.stringify(transcripts.length)); +} + const getTopics = () => { const filePath = path.join(process.cwd(), "public", "topics.json"); const fileContents = fs.readFileSync(filePath, "utf8"); @@ -552,6 +556,7 @@ export default makeSource({ getTranscriptAliases(allTranscripts); createSpeakers(allTranscripts); generateSourcesCount(allTranscripts, allSources); - lightWeightTranscript(allTranscripts) + lightWeightTranscript(allTranscripts); + getTranscriptsLength(allTranscripts); }, }); diff --git a/src/components/landing-page/HeroSection.tsx b/src/components/landing-page/HeroSection.tsx index 1dc1650..c68ef7e 100644 --- a/src/components/landing-page/HeroSection.tsx +++ b/src/components/landing-page/HeroSection.tsx @@ -5,6 +5,7 @@ import Image from "next/image"; import HeroImageDestop from "/public/images/hero-desktop-image.webp"; import { ArrowLinkUpRight } from "@bitcoin-dev-project/bdp-ui/icons"; import circleBackground from "/public/svgs/circle-background.svg"; +import transcriptsLength from "/public/transcripts-length.json"; import circleBackgroundMobile from "/public/svgs/circle-background-mobile.svg"; import mobileDesktopImage from "/public/svgs/mobile-desktop-image.svg"; import Wrapper from "../layout/Wrapper"; @@ -23,7 +24,7 @@ const HeroSection = ({languageCode}: {languageCode: LanguageCode}) => { {t("home.hero.title")}
- {t("home.hero.subtitle-1")} {t("home.hero.subtitle-2")}{" "} + {transcriptsLength || "1024+"} {t("home.hero.subtitle-1")} {t("home.hero.subtitle-2")}{" "} {t("home.hero.subtitle-3")}
diff --git a/src/components/layout/FooterComponent.tsx b/src/components/layout/FooterComponent.tsx index 41aa076..bc042c0 100644 --- a/src/components/layout/FooterComponent.tsx +++ b/src/components/layout/FooterComponent.tsx @@ -89,7 +89,7 @@ const FooterComponent = () => { />