Files
docs/versioned_docs/version-2.10/developer-guide/theme/template-variables/post.md
Ryan Wang de60c8a3fd chore: improve importing markdown file name (#368)
为被导入的 Markdown 片段文件名添加 `_`,防止为其生成页面。比如:https://docs.halo.run/developer-guide/theme/vo/ThemeVo

参考文档:https://docusaurus.io/docs/2.x/markdown-features/react#importing-markdown

/kind improvement

```release-note
None
```
2024-06-03 06:35:44 +00:00

915 B

title, description
title description
文章 post.html - /archives/:slug

import CategoryVo from "../vo/_CategoryVo.md" import TagVo from "../vo/_TagVo.md" import ContentVo from "../vo/_ContentVo.md" import ContributorVo from "../vo/_ContributorVo.md" import PostVo from "../vo/_PostVo.md"

路由信息

  • 模板路径:/templates/post.html
  • 访问路径:/archives/:slug

变量

post

变量类型

#PostVo

示例

<article>
  <h1 th:text="${post.spec.title}"></h1>
  <div th:utext="${post.content.content}"> </div>
</article>

_templateId

变量值

post

类型定义

CategoryVo

TagVo

ContributorVo

ContentVo

PostVo