网站配置/使用备忘录
Front-matter
Front-matter是Markdown文件开头的YAML格式的元数据块,用于配置页面的属性。
主题官方文档:Butterfly 文档(二) 主题页面
文章 Post
1 | --- |
参数说明
参数 | 类型/格式 | 默认值 | 说明 |
---|---|---|---|
title | str | 无题 | 【必选】文章标题 |
abbrlink | str | auto | 【必选】文章的短链接 |
date | YYYY-MM-DD | auto | 【必选】文章发布日期 |
description | str | None | 文章描述 |
categories | str | None | 文章分类 |
tags | list[str] | None | 文章标签 |
swiper_index | int | None | 置顶文章轮播,数值越大越靠前 |
message | str | None | 加密问题提示 |
password | str | None | 加密文章密码 |
wrong_pass_message | str | None | 密码错误时的提示信息 |
不常用参数
参数 | 类型/格式 | 默认值 | 说明 |
---|---|---|---|
updated | YYYY-MM-DD | auto | 文章最后更新时间 |
keywords | str/list[str] | None | 文章关键词 |
top_img | img_url | rand | 文章顶部图片 |
cover | img_url | rand | 文章封面图片 |
comments | bool | true | 启用评论功能 |
aside | bool | true | 启用侧边栏 |
mathjax | bool | config.mathjax.per_page=true 本项无效 | 启用数学公式 |
toc | bool | config.toc.post (true) | 启用文章目录 |
toc_number | bool | config.toc.number (false) | 文章目录编号 |
copyright | bool | config.post_copyright.enable (true) | 末尾版权信息模块 |
copyright_author | str | config.author | 版权模块作者名 |
copyright_author_href | str | None | 版权模块作者链接 |
copyright_url | str | None | 版权模块文章链接 |
copyright_info | str | None | 版权模块声明文字 |
项目结构
source
```plaintext
source
├── _data
│ ├── link.yml: 友链配置
│ └── menu.yml
├── _drafts: 草稿
├── _posts: 文章
├── about: “关于”页面
├── assets: 静态资源
| ├── avatars: 头像
评论