From 89de966e7aed0fb0251554d90d15b429664eecde Mon Sep 17 00:00:00 2001 From: Zeno Kapitein Date: Thu, 22 Jan 2026 13:57:40 +0100 Subject: [PATCH] Support social accounts customization option (#3916) --- .changeset/fluffy-lines-type.md | 5 + .../gitbook/src/components/Footer/Footer.tsx | 18 +++ .../src/components/Footer/SocialLink.tsx | 104 ++++++++++++++++++ .../components/SpaceLayout/SpaceLayout.tsx | 2 + 4 files changed, 129 insertions(+) create mode 100644 .changeset/fluffy-lines-type.md create mode 100644 packages/gitbook/src/components/Footer/SocialLink.tsx diff --git a/.changeset/fluffy-lines-type.md b/.changeset/fluffy-lines-type.md new file mode 100644 index 000000000..b7985bf74 --- /dev/null +++ b/.changeset/fluffy-lines-type.md @@ -0,0 +1,5 @@ +--- +"gitbook": patch +--- + +Support social links diff --git a/packages/gitbook/src/components/Footer/Footer.tsx b/packages/gitbook/src/components/Footer/Footer.tsx index e909bba3d..ab551ec54 100644 --- a/packages/gitbook/src/components/Footer/Footer.tsx +++ b/packages/gitbook/src/components/Footer/Footer.tsx @@ -8,6 +8,7 @@ import { tcls } from '@/lib/tailwind'; import { ThemeToggler } from '../ThemeToggler'; import { CONTAINER_STYLE } from '../layout'; import { FooterLinksGroup } from './FooterLinksGroup'; +import { SocialLink } from './SocialLink'; const FOOTER_COLUMNS = 4; @@ -23,6 +24,8 @@ export function Footer(props: { context: GitBookSiteContext }) { const mobileOnly = !hasLogo && !hasGroups && !hasCopyright && hasThemeToggle; + const socialLinks = customization.socialAccounts.filter((account) => account.display?.footer); + return (