Solitude Docs
参考

配置参考

按字段查阅当前主题的完整默认配置。

以下默认值来自 src/lib/defaults.json。顶层站点字段见站点配置;模板覆盖值见 src/site.config.ts。对象递归合并,数组整体替换。兼容字段可能没有可见效果。

基础默认与模板覆盖

功能基础默认模板
评论 / 音乐馆关闭,标识为空关闭
音乐胶囊关闭启用示例汽水歌单
封面取色关闭本地模式
短文 / 快捷键关闭启用
本地搜索按需加载预加载
PWA manifest关闭启用,无离线缓存

site

字段默认值
theme.site.name.class"text"
theme.site.name.custom"Solitude"
theme.site.icon"/img/logo.png"
字段默认值
theme.nav.group{}
theme.nav.right.randomtrue
theme.nav.right.custom[]

hometop

字段默认值
theme.hometop.enabletrue
theme.hometop.banner.title"Solitude"
theme.hometop.banner.desc"A fast, elegant and feature-rich Astro theme"
theme.hometop.banner.icon{}
theme.hometop.group{}
theme.hometop.recommendList[]

aside

字段默认值
theme.aside.position1
theme.aside.home.noSticky"about"
theme.aside.home.Sticky"allInfo"
theme.aside.post.noSticky"about"
theme.aside.post.Sticky"newestPost,allInfo"
theme.aside.page.noSticky"about"
theme.aside.page.Sticky"newestPost,allInfo"
theme.aside.my_card.author.img"/img/logo.png"
theme.aside.my_card.author.emojinull
theme.aside.my_card.author.stickernull
theme.aside.my_card.description"An Astro theme for expressive personal sites."
theme.aside.my_card.content"Write, collect, and share with Solitude."
theme.aside.my_card.state.morning"Good morning"
theme.aside.my_card.state.noon"Good noon"
theme.aside.my_card.state.afternoon"Good afternoon"
theme.aside.my_card.state.night"Good evening"
theme.aside.my_card.state.goodnight"Good night"
theme.aside.my_card.witty_words[]
theme.aside.my_card.information[]
theme.aside.toc.posttrue
theme.aside.toc.pagetrue
theme.aside.toc.vaguetrue
theme.aside.tags.enabletrue
theme.aside.tags.limit20
theme.aside.tags.highlight_list[]
theme.aside.siteinfo.postcounttrue
theme.aside.siteinfo.wordcounttrue
theme.aside.siteinfo.updatetimetrue
theme.aside.siteinfo.runtimeenabletrue
theme.aside.siteinfo.runtime"2023-04-20 00:00:00"

page

字段默认值
theme.page.errortrue
theme.page.tagstrue
theme.page.categoriestrue
theme.page.archives0
theme.page.links.async_threshold200
theme.page.default.cover["/img/default.avif"]

post

字段默认值
theme.post.default.cover["/img/default.avif"]
theme.post.default.locate"China"
theme.post.default.copyright.enabletrue
theme.post.default.copyright.author"/img/logo.png"
theme.post.default.copyright.author_background""
theme.post.default.copyright.license"CC BY-NC-SA 4.0"
theme.post.default.copyright.licenurl"https://creativecommons.org/licenses/by-nc-sa/4.0/"
theme.post.meta.datetrue
theme.post.meta.updatedtrue
theme.post.meta.locatetrue
theme.post.meta.wordcounttrue
theme.post.meta.readtimetrue
theme.post.meta.pvfalse
theme.post.meta.commentfalse
theme.post.award.enablefalse
theme.post.award.list[]
theme.post.share.enablefalse
theme.post.share.list[]
theme.post.rss"/index.xml"
theme.post.covercolor.enablefalse
theme.post.covercolor.mode"local"
theme.post.covercolor.api"https://api.qjqq.cn/api/Imgcolor?img="
theme.post.covercolor.time43200000

theme_color

字段默认值
theme.theme_color.dark"#ffc848"
theme.theme_color.light"#425aef"
theme.theme_color.nav_hover_text.dark"#1b1c20"
theme.theme_color.nav_hover_text.light"#ffffff"

display_mode

字段默认值
theme.display_mode.type"auto"

font

字段默认值
theme.font.font_size"16px"
theme.font.code_font_size"16px"
theme.font.font_family"system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"
theme.font.code_font_family"ui-monospace, SFMono-Regular, Menlo, monospace"

index_post_list

字段默认值
theme.index_post_list.direction"column"
theme.index_post_list.column2
theme.index_post_list.cover"both"

related_post

字段默认值
theme.related_post.enabletrue
theme.related_post.limit3
theme.related_post.date_type"created"

expire

字段默认值
theme.expire.enablefalse
theme.expire.time30
theme.expire.position"top"
theme.expire.text_prev"This post was last updated "
theme.expire.text_next" days ago. Some information may be out of date."

right_menu

字段默认值
theme.right_menu.enabletrue
theme.right_menu.exclude["music"]
theme.right_menu.commentBarragefalse
theme.right_menu.ctrlOriginalMenufalse
theme.right_menu.translatefalse
theme.right_menu.musicfalse
theme.right_menu.limit50
theme.right_menu.author"Author: "
theme.right_menu.link"Link: "
theme.right_menu.source"Source: Solitude"
theme.right_menu.info""
theme.right_menu.img_error"Unable to download image"
theme.right_menu.mode.dark"Dark mode"
theme.right_menu.mode.light"Light mode"
theme.right_menu.barrage.open"Show comment barrage"
theme.right_menu.barrage.close"Hide comment barrage"
theme.right_menu.custom_list[]

copy

字段默认值
theme.copy.enabletrue
theme.copy.copyright.enablefalse
theme.copy.copyright.limit50

mermaid

字段默认值
theme.mermaidtrue

chart

字段默认值
theme.charttrue

typeit

字段默认值
theme.typeittrue

console

字段默认值
theme.console.enabletrue
theme.console.recentComment.enablefalse
theme.console.recentComment.storage0.2
theme.console.card.tagstrue
theme.console.card.archive"month"

translate

字段默认值
theme.translate.enablefalse
theme.translate.defaultEncoding2
theme.translate.translateDelay0

rightside

字段默认值
theme.rightside.enabletrue
theme.rightside.hide.enabletrue
theme.rightside.hide.translatetrue
theme.rightside.hide.modetrue
theme.rightside.hide.asidetrue
字段默认值
theme.footer.randomlinkfalse
theme.footer.information.author"/img/logo.png"
theme.footer.information.left[]
theme.footer.information.right[]
theme.footer.group{}
theme.footer.links[]
theme.footer.beian[]

errorpage

字段默认值
theme.errorpage.img"/img/404.avif"
theme.errorpage.text"=awa= Page Not Found"
theme.errorpage.recommendListtrue

capsule

字段默认值
theme.capsule.enablefalse
theme.capsule.id""
theme.capsule.server"netease"
theme.capsule.type"playlist"
theme.capsule.volume0.8

music

字段默认值
theme.music.enablefalse
theme.music.id""
theme.music.server"netease"
theme.music.type"playlist"
theme.music.volume0.8
theme.music.mutextrue
theme.music.order"list"

meting_api

字段默认值
theme.meting_api"https://meting.efu.me/?server=:server&type=:type&id=:id&r=:r"

keyboard

字段默认值
theme.keyboard.enablefalse
theme.keyboard.list[]

lazyload

字段默认值
theme.lazyload.enabletrue
theme.lazyload.field"site"
theme.lazyload.placeholder""
theme.lazyload.errorimg"/img/error_load.avif"

loading

字段默认值
theme.loading.fullpagefalse
theme.loading.pacetrue

highlight

字段默认值
theme.highlight.enabletrue
theme.highlight.copytrue
theme.highlight.line_numberstrue
theme.highlight.themes.light"github-light"
theme.highlight.themes.dark"github-dark"
theme.highlight.max_height360
字段默认值
theme.lightbox"fancybox"

memorial

字段默认值
theme.memorial.enablefalse
theme.memorial.date[]

katex

字段默认值
theme.katex.enabletrue
theme.katex.per_pagetrue
theme.katex.copytextrue

pwa

字段默认值
theme.pwa.enablefalse
theme.pwa.manifest"/manifest.json"
theme.pwa.theme_color"#425aef"
theme.pwa.mask_icon"/img/pwa/favicon.png"
theme.pwa.apple_touch_icon"/img/pwa/favicon.png"
theme.pwa.favicon_32_32"/img/pwa/favicon_32.png"
theme.pwa.favicon_16_16"/img/pwa/favicon_16.png"
theme.pwa.bookmark_icon"/img/pwa/favicon.png"

comment

字段默认值
theme.comment.use""
theme.comment.commentBarragefalse
theme.comment.lazyloadfalse
theme.comment.countfalse
theme.comment.sidebarfalse
theme.comment.pvfalse
theme.comment.avatar"https://weavatar.com"
theme.comment.hot_tip.enablefalse
theme.comment.hot_tip.count3
theme.comment.newest_comment.enablefalse
theme.comment.newest_comment.storage0.5
theme.comment.newest_comment.limit5

twikoo

字段默认值
theme.twikoo.envId""
theme.twikoo.region""
theme.twikoo.styletrue
theme.twikoo.accessToken""
theme.twikoo.option{}

waline

字段默认值
theme.waline.serverURL""
theme.waline.pageviewfalse
theme.waline.option{}

valine

字段默认值
theme.valine.appId""
theme.valine.appKey""
theme.valine.serverURLs""
theme.valine.avatar"mp"
theme.valine.visitorfalse
theme.valine.styletrue
theme.valine.option{}

artalk

字段默认值
theme.artalk.server""
theme.artalk.site""
theme.artalk.option{}

giscus

字段默认值
theme.giscus.repo""
theme.giscus.repo_id""
theme.giscus.category_id""
theme.giscus.mapping"pathname"
theme.giscus.theme.light"light"
theme.giscus.theme.dark"dark"
theme.giscus.option{}
字段默认值
theme.search.enabletrue
theme.search.type"local"
theme.search.tags[]
theme.search.local.preloadfalse
theme.search.local.CDN"/search.xml"
theme.search.algolia.appId""
theme.search.algolia.apiKey""
theme.search.algolia.indexName""
theme.search.algolia.hits.per_page6
theme.search.docsearch.appId""
theme.search.docsearch.apiKey""
theme.search.docsearch.indexName""
theme.search.docsearch.placeholder""
theme.search.docsearch.option{}

envelope

字段默认值
theme.envelope.enablefalse
theme.envelope.line10
theme.envelope.speed20
theme.envelope.hovertrue
theme.envelope.looptrue
theme.envelope.page"/message/"

brevity

字段默认值
theme.brevity.enablefalse
theme.brevity.home_minifalse
theme.brevity.musicfalse
theme.brevity.page"/essay/"
theme.brevity.style1
theme.brevity.strip30

recent_comments

字段默认值
theme.recent_comments.enablefalse
theme.recent_comments.limit50
theme.recent_comments.cache0.2
theme.recent_comments.page"/recentcomments/"

verify_site

字段默认值
theme.verify_site[]

extends

字段默认值
theme.extends.head[]
theme.extends.body[]

cdn

字段默认值
theme.cdn.fontawesome"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@7.3.0/css/all.min.css"
theme.cdn.snackbar"https://cdn.jsdelivr.net/npm/node-snackbar@0.1.16/dist/snackbar.min.js"
theme.cdn.lazyload"https://cdn.jsdelivr.net/npm/vanilla-lazyload@19.1.3/dist/lazyload.iife.min.js"
theme.cdn.fancyapps_css"https://cdn.jsdelivr.net/npm/@fancyapps/ui@6.1.14/dist/fancybox/fancybox.css"
theme.cdn.fancyapps_js"https://cdn.jsdelivr.net/npm/@fancyapps/ui@6.1.14/dist/fancybox/fancybox.umd.js"
theme.cdn.mermaid"https://cdn.jsdelivr.net/npm/mermaid@11.16.0/dist/mermaid.min.js"
theme.cdn.chart"https://cdn.jsdelivr.net/npm/chart.js@4.5.1/dist/chart.umd.min.js"
theme.cdn.abcjs"https://cdn.jsdelivr.net/npm/abcjs@6.6.4/dist/abcjs-basic-min.js"
theme.cdn.typeit"https://cdn.jsdelivr.net/npm/typeit@8.8.7/dist/index.umd.min.js"
theme.cdn.katex_css"https://cdn.jsdelivr.net/npm/katex@0.16.47/dist/katex.min.css"
theme.cdn.katex_copytex"https://cdn.jsdelivr.net/npm/katex@0.16.47/dist/contrib/copy-tex.min.js"
theme.cdn.aplayer_css"https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css"
theme.cdn.aplayer_js"https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.js"
theme.cdn.meting_js"https://cdn.jsdelivr.net/npm/meting@2.0.2/dist/Meting.min.js"
theme.cdn.colorthief"https://cdn.jsdelivr.net/npm/colorthief@3.4.0/dist/umd/color-thief.global.min.js"
theme.cdn.twikoo"https://cdn.jsdelivr.net/npm/twikoo@1.6.44/dist/twikoo.all.min.js"
theme.cdn.waline_css"https://cdn.jsdelivr.net/npm/@waline/client@3.6.0/dist/waline.css"
theme.cdn.waline"https://cdn.jsdelivr.net/npm/@waline/client@3.6.0/dist/waline.umd.js"
theme.cdn.valine"https://cdn.jsdelivr.net/npm/valine@1.5.3/dist/Valine.min.js"
theme.cdn.blueimp_md5"https://cdn.jsdelivr.net/npm/blueimp-md5@2.19.0/js/md5.min.js"
theme.cdn.artalk_css"https://cdn.jsdelivr.net/npm/artalk@2.9.1/dist/Artalk.css"
theme.cdn.artalk"https://cdn.jsdelivr.net/npm/artalk@2.9.1/dist/Artalk.js"
theme.cdn.algoliasearch"https://cdn.jsdelivr.net/npm/algoliasearch@5.46.3/dist/lite/builds/browser.umd.js"
theme.cdn.instantsearch_css"https://cdn.jsdelivr.net/npm/instantsearch.css@8.9.0/themes/satellite-min.css"
theme.cdn.instantsearch"https://cdn.jsdelivr.net/npm/instantsearch.js@4.84.0/dist/instantsearch.production.min.js"
theme.cdn.docsearch_css"https://cdn.jsdelivr.net/npm/@docsearch/css@4.5.0/dist/style.css"
theme.cdn.docsearch_js"https://cdn.jsdelivr.net/npm/@docsearch/js@4.5.0/dist/umd/index.js"

相关文档

站点配置 · 高级配置