文章
FrontMatter
提示
更多配置项可参见:
- 文章(Post)配置:PostFrontmatter (文章配置包含页面配置)
- 页面(Page)配置:PageFrontmatter (可参见页面配置 | Valaxy)
PostFrontmatter Types
ts[object Promise]
文章(post)继承自页面(page),因此页面中的 Front Matter 通用被文章支持。
单篇文章支持的配置项。
譬如:
md[object Promise]
title: 文章标题hide: 你可以在文章头部添加 hide 属性,来临时隐藏某篇文章。(该文章仍然会被渲染)true/all: 当设置为true或all时,该文章仍然会被渲染,你可以直接访问链接进行查看。但不会被显示在展示的文章卡片与归档中。index: 设置为index时,将只在首页隐藏,归档中仍然展示。(譬如放一些没有必要放在首页的笔记,并在归档中方便自己查看。)
摘要
你可以通过插入 <!-- more --> 的方式生成摘要(excerpt)。 可通过设置 excerpt_type 设置摘要渲染类型。
excerpt: 自定义摘要(优先级高于<!-- more -->)excerpt_type: 预览列表摘要的渲染类型(与<!-- more -->配合使用)md: 展示原始 Markdownhtml: 以 HTML 形式展示text: 以纯文本形式展示(去除 HTML 标签)
md[object Promise]
md[object Promise]
md[object Promise]
md[object Promise]
You will get excerpt:
md[object Promise]
md[object Promise]
md[object Promise]
md[object Promise]
插入
组件
脚本
可直接通过 useScriptTag 使用,封装为组件或直接添加在文章中。
vue[object Promise]
强制规范
由于 Valaxy 支持解析 Vue 组件渲染,因此当您输入 <CustomComponent></CustomComponent> 时,它会解析 components 目录下的 CustomComponent.vue 组件并渲染。
当您不需要其被渲染时,请务必使用反引号包裹,如:
md[object Promise]
To Be Continued.