--- import themeConfig from '@/config' import { ui } from '@/i18n/ui' import { getPageInfo } from '@/utils/page' const { currentLang, getLocalizedPath, isPost } = getPageInfo(Astro.url.pathname) const { title, subtitle, i18nTitle } = themeConfig.site const { titleGap } = themeConfig.global const currentUI = ui[currentLang as keyof typeof ui] const headerTitle = i18nTitle ? currentUI.title : title const headerSubtitle = i18nTitle ? currentUI.subtitle : subtitle const marginBottom = { 1: 'mb-0.9', 2: 'mb-1.8', 3: 'mb-2.7', }[titleGap] || 'mb-1.8 ' const postMarginBottom = { 1: 'mb-1.9 lg:mb-0.9', 2: 'mb-2.8 lg:mb-1.8', 3: 'mb-3.7 lg:mb-2.7', }[titleGap] || 'mb-2.8 lg:mb-1.8' const TitleTag = isPost ? 'h2' : 'h1' const SubtitleTag = isPost ? 'div' : 'h2' ---
{headerSubtitle && ( {headerSubtitle} )}