import { useFrontmatter, useI18n, useLang, useSite } from "@rspress/core/runtime" import { Link } from "@rspress/core/theme-original" import type { CustomI18n } from "../lib/i18n" import { ICP_NUMBER, MIIT_URL, PRIVACY_PATH, TERMS_PATH } from "../lib/site" /** * Site-wide footer, injected through the `Layout` bottom slot so it appears on * every page type. * * The built-in `HomeFooter` only renders when `themeConfig.footer.message` is * set, and it has no per-locale switching — so it is deliberately left unset in * `rspress.config.ts` and this component is the single source of the footer. */ export function SiteFooter() { const t = useI18n() const lang = useLang() const { site } = useSite() const { frontmatter } = useFrontmatter() if (frontmatter?.hideSiteFooter === true) return null // Rspress strips the language prefix from routes in the default language, // so only non-default locales need one. const prefix = lang === site.lang ? "" : `/${lang}` return ( ) }