配置参考
本页面提供 app/config/index.ts 中所有配置选项的完整参考。
siteConfig 对象
Section titled “siteConfig 对象”网站基本信息配置。
| 属性 | 类型 | 说明 |
|---|---|---|
title | string | 网站标题,显示在浏览器标签页和导航栏 |
subtitle | string | 网站副标题,显示在首页 |
description | string | 网站描述,用于 SEO |
url | string | 网站完整 URL |
articles
Section titled “articles”文章功能配置。
| 属性 | 类型 | 说明 |
|---|---|---|
pageTitle | string | 文章页面标题 |
pageDescription | string | 文章页面描述 |
postsPerPage | number | 每页显示文章数量 |
sourceDescription | string | 文章来源说明 |
首页内容配置。
| 属性 | 类型 | 说明 |
|---|---|---|
mainTitle | string | 首页主标题 |
welcomeText | string | 欢迎语句 |
features | array | 特色介绍卡片数组 |
features 数组项
Section titled “features 数组项”{ title: string // 特色标题 description: string // 特色描述}各页面配置。
pages: { home: { title: string } articles: { title: string, description: string } about: { title: string } projects: { title: string, description: string } friends: { title: string, description: string } website: { title: string description: string statusCheck: { enable: boolean // 是否开启状态监测 autoRefreshInterval: number // 自动刷新间隔(毫秒) timeout: number // 检测超时时间(毫秒) showResponseTime: boolean // 是否显示响应时间 } }}personal
Section titled “personal”个人信息配置。
| 属性 | 类型 | 说明 |
|---|---|---|
name | string | 你的名字 |
bio | string | 个人简介 |
hobby | string | 兴趣爱好 |
location | string | 地理位置 |
learning | string | 正在学习的技术 |
avatar | string | 头像 URL |
social | object | 社交链接 |
blog | object | 博客信息 |
social 对象
Section titled “social 对象”social: { github: string // GitHub 主页链接 email: string // 邮箱地址}blog 对象
Section titled “blog 对象”blog: { url: string // 博客地址}qualificationSections
Section titled “qualificationSections”个人履历组件显示开关。
| 属性 | 类型 | 说明 |
|---|---|---|
githubHeatmap | boolean | 显示 GitHub 热力图 |
skills | boolean | 显示技能专长 |
education | boolean | 显示教育背景 |
workExperience | boolean | 显示工作经历 |
projects | boolean | 显示项目经历 |
awards | boolean | 显示获得荣誉 |
navigation
Section titled “navigation”导航菜单配置,数组类型。
navigation: [ { name: string // 显示名称 href: string // 链接路径 key: string // 唯一标识 }]主题样式配置。
| 属性 | 类型 | 说明 |
|---|---|---|
primaryColor | string | 主色调(十六进制颜色) |
secondaryColor | string | 次要色 |
accentColor | string | 强调色 |
textColor | string | 文字颜色 |
fontFamily | string | 字体族 |
customCursor | boolean | 是否启用自定义鼠标样式 |
scrollNavigation | boolean | 是否启用滚动页面导航 |
Umami 统计配置。
| 属性 | 类型 | 说明 |
|---|---|---|
enable | boolean | 是否启用统计显示 |
apiKey | string | Umami API 密钥 |
websiteId | string | 网站 ID |
apiEndpoint | string | API 端点地址 |
在 .env 文件中配置:
| 变量名 | 说明 |
|---|---|
RSS_URL | RSS 订阅地址 |
NUXT_PUBLIC_SITE_URL | 网站公开 URL |
nuxt.config.ts
Section titled “nuxt.config.ts”Nuxt 配置文件参考。
export default defineNuxtConfig({ compatibilityDate: '2025-07-15', devtools: { enabled: true },
css: [ '@/assets/styles/global.css' ],
modules: [ '@nuxtjs/tailwindcss' ],
runtimeConfig: { rssUrl: process.env.RSS_URL || 'https://blog.example.com/rss.xml', public: { siteUrl: process.env.NUXT_PUBLIC_SITE_URL || 'https://example.com' } },
build: { transpile: process.env.NODE_ENV === 'production' ? ['fast-xml-parser'] : [] }})getPageConfig
Section titled “getPageConfig”获取页面配置的辅助函数:
import { getPageConfig } from '../config'
const pageConfig = getPageConfig('about')// 返回 { title: "关于" }siteConfig
Section titled “siteConfig”直接导入完整配置:
import { siteConfig } from '../config'
console.log(siteConfig.site.title)console.log(siteConfig.personal.name)