#──────────────────────────────────────────── # 1. 全局基础设置 #──────────────────────────────────────────── # baseURL = "https://zopiya.com/" languageCode = "zh" title = "向阳而生" theme = "typo" defaultContentLanguage = "zh" hasCJKLanguage = true enableEmoji = true canonifyURLs = true timeout = "300s" enableRobotsTXT = true #──────────────────────────────────────────── # 2. 模块化(可选,推荐 Hugo Modules 管理主题) #──────────────────────────────────────────── # [module] # [[module.imports]] # path = "github.com/7wate/typo" #──────────────────────────────────────────── # 3. URL 与国际化 #──────────────────────────────────────────── [permalinks] posts = ":slug/" # 如果未来要做多语言,这里可启用 # enableMultilingual = true # [languages] # [languages.zh] # languageName = "中文" # weight = 1 # [languages.en] # languageName = "English" # weight = 2 #──────────────────────────────────────────── # 4. 自定义分类、标签、系列 #──────────────────────────────────────────── [taxonomies] tag = "tags" category = "categories" series = "series" #──────────────────────────────────────────── # 5. 输出格式与输出控制 #──────────────────────────────────────────── [outputFormats] [outputFormats.RSS] mediaType = "application/rss+xml" baseName = "rss" isHTML = false isPlainText = false noUgly = true rel = "alternate" [outputFormats.Feed] mediaType = "application/rss+xml" baseName = "feed" isHTML = false isPlainText = false noUgly = true rel = "alternate" [outputs] home = ["HTML", "RSS", "Feed", "SITEMAP", "ROBOTS"] #──────────────────────────────────────────── # 6. 主题参数 #──────────────────────────────────────────── [params] description = "愿我们都能:执着于热爱,纯粹于当下。" theme = "auto" colorPalette = "base16-default" hideHeader = true readTime = true paginationSize = 10 listSummaries = false # 若启用 listSummaries = true,需要指定 summaryLength # summaryLength = 70 listDateFormat = "2006 Jan" homeDateFormat = "2 Jan" homeIntroTitle = "👋👋👋" homeIntroContent = """愿我们都能:执着于热爱,纯粹于当下。""" homeCollectionTitle = "文辑" homeCollection = "posts" [params.breadcrumbs] enabled = true showCurrentPage = true home = "首页" [params.umami] enable = true websiteId = "ce53db0e-af27-4703-ba19-d4792c8cff78" # 建议托管到 CDN 域名,或根目录以减少跨域请求 jsLocation = "https://umami.7wate.com/script.js" #──────────────────────────────────────────── # 7. 菜单与社交 #──────────────────────────────────────────── [[params.menu]] name = "首页" url = "/" weight = 1 [[params.menu]] name = "文辑" url = "/posts/" weight = 2 [[params.menu]] name = "片语" url = "https://memos.7wate.com/explore" newTab = true weight = 3 [[params.menu]] name = "关于" url = "/about/" newTab = true weight = 4 [[params.social]] name = "github" url = "https://github.com/zopiya" [[params.social]] name = "gmail" url = "mailto:i@zopiya.com" [[params.social]] name = "rss" # 通常 RSS 放在 /rss.xml 而非 /index.xml url = "/rss.xml" #──────────────────────────────────────────── # 8. Markdown 与高亮 #──────────────────────────────────────────── [markup] [markup.highlight] style = "algol" [markup.goldmark.renderer] unsafe = true # 生产环境建议设为 false #──────────────────────────────────────────── # 9. 安全与隐私 #──────────────────────────────────────────── [security] enableInlineShortcodes = true [privacy] [privacy.googleAnalytics] anonymizeIP = true respectDoNotTrack = true useSessionStorage = false disable = true # 如不使用 GA,建议删掉整个块 #──────────────────────────────────────────── # 10. 构建压缩与优化 #──────────────────────────────────────────── [minify] disableXML = false minifyOutput = true #──────────────────────────────────────────── # 11. 站点地图(SEO) #──────────────────────────────────────────── [sitemap] changefreq = "weekly" priority = 0.5 filename = "sitemap.xml" #──────────────────────────────────────────── # 12. RSS 服务 #──────────────────────────────────────────── [services] [services.rss] limit = 7 # -1 表示不限制条目数