Files
kazoottt-blog-v2/src/site.config.ts
KazooTTT baee12dd9f style: 修改标题和样式
- 修改网站标题为 "KazooTTT 博客"
- 修改头部导航栏样式,使页面更加美观
2025-04-01 22:31:36 +08:00

87 lines
2.9 KiB
TypeScript

import type { SiteConfig } from "@/types";
import type { AstroExpressiveCodeOptions } from "astro-expressive-code";
export const siteConfig: SiteConfig = {
// Used as both a meta property (src/components/BaseHead.astro L:31 + L:49) & the generated satori png (src/pages/og-image/[slug].png.ts)
author: "KazooTTT",
// Date.prototype.toLocaleDateString() parameters, found in src/utils/date.ts.
date: {
locale: "zh-CN",
options: {
day: "numeric",
month: "short",
year: "numeric",
},
},
// Used as the default description meta property and webmanifest description
description: "记录技术分享、学习笔记、生活日常、碎碎念的地方。",
// HTML lang property, found in src/layouts/Base.astro L:18 & astro.config.ts L:48
lang: "zh-CN",
// Meta property, found in src/components/BaseHead.astro L:42
ogLocale: "zh_CN",
// Used to construct the meta title property found in src/components/BaseHead.astro L:11, and webmanifest name found in astro.config.ts L:42
title: "KazooTTT 博客",
// ! Please remember to replace the following site property with your own domain, used in astro.config.ts
url: "https://blog.kazoottt.top/",
rssConfig: {
noteTitle: "碎碎念 - KazooTTT 博客",
noteDescription: "分享一些比较碎片化的内容。",
blogTitle: "博客 - KazooTTT",
blogDescription: "分享一些技术笔记、个人随笔、生活日常等比较长篇的内容。",
},
};
// Used to generate links in both the Header & Footer.
export const menuLinks: { path: string; title: string }[] = [
{
path: "/",
title: "Home",
},
// {
// path: "/about/",
// title: "About",
// },
{
path: "/posts/",
title: "Blog",
},
// {
// path: "/notes/",
// title: "Notes",
// },
{
path: "/friends/",
title: "Friends",
},
];
// https://expressive-code.com/reference/configuration/
export const expressiveCodeOptions: AstroExpressiveCodeOptions = {
styleOverrides: {
borderRadius: "4px",
codeFontFamily:
'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;',
codeFontSize: "0.875rem",
codeLineHeight: "1.7142857rem",
codePaddingInline: "1rem",
frames: {
frameBoxShadowCssValue: "none",
},
uiLineHeight: "inherit",
},
themeCssSelector(theme, { styleVariants }) {
// If one dark and one light theme are available
// generate theme CSS selectors compatible with cactus-theme dark mode switch
if (styleVariants.length >= 2) {
const baseTheme = styleVariants[0]?.theme;
const altTheme = styleVariants.find((v) => v.theme.type !== baseTheme?.type)?.theme;
if (theme === baseTheme || theme === altTheme) return `[data-theme='${theme.type}']`;
}
// return default selector
return `[data-theme="${theme.name}"]`;
},
// One dark, one light theme => https://expressive-code.com/guides/themes/#available-themes
themes: ["dracula", "github-light"],
useThemedScrollbars: false,
};