mirror of
https://github.com/halo-dev/docs.git
synced 2026-01-14 07:02:53 +08:00
为 [Halo 2.18](https://github.com/halo-dev/halo/releases/tag/v2.18.0) 更新文档。 /kind documentation ```release-note None ```
54 lines
773 B
Markdown
54 lines
773 B
Markdown
---
|
|
title: 独立页面
|
|
description: page.html - /:slug
|
|
---
|
|
|
|
import SinglePageVo from "../vo/_SinglePageVo.md"
|
|
import ContributorVo from "../vo/_ContributorVo.md"
|
|
import ContentVo from "../vo/_ContentVo.md"
|
|
|
|
## 路由信息
|
|
|
|
- 模板路径:`/templates/page.html`
|
|
- 访问路径:`/:slug`
|
|
|
|
## 变量
|
|
|
|
### singlePage
|
|
|
|
#### 变量类型
|
|
|
|
[#SinglePageVo](#singlepagevo)
|
|
|
|
#### 示例
|
|
|
|
```html title="/templates/page.html"
|
|
<article>
|
|
<h1 th:text="${singlePage.spec.title}"></h1>
|
|
<div th:utext="${singlePage.content.content}"> </div>
|
|
</article>
|
|
```
|
|
|
|
### _templateId
|
|
|
|
#### 变量值
|
|
|
|
`page`
|
|
|
|
## 类型定义
|
|
|
|
### SinglePageVo
|
|
|
|
<SinglePageVo />
|
|
|
|
- [#ContentVo](#contentvo)
|
|
- [#ContributorVo](#contributorvo)
|
|
|
|
### ContentVo
|
|
|
|
<ContentVo />
|
|
|
|
### ContributorVo
|
|
|
|
<ContributorVo />
|