配置
首页
设置推荐文章和列表布局。
将示例中的字段合并到现有 src/site.config.ts,保留自己的内容。
// src/site.config.ts
import { defineSolitudeConfig } from './lib/config';
export default defineSolitudeConfig({
theme: {
hometop: {
enable: true,
recommendList: [{ title: 'Start here', url: '/p/hello-world/',
cover: '/img/demo/cover-getting-started-v2.webp', label: 'Guide' }],
},
index_post_list: { direction: 'column', column: 2, cover: 'both' },
},
});推荐先使用 recommendList,再按文章日期补足最多五项;单项 enable: false 可隐藏。列表按置顶权重和日期排序。home: false 隐藏文章的首页展示。hometop.banner 与 group 是兼容字段,当前轮播不渲染其内容。
