🎉 Our
new modular theme
is available now, which ships with much more features and higher flexibility, please consider giving it a try for your new static sites. :)
This theme provides several kinds of layouts, such as
posts
and
docs
.
Our documentation uses the
docs
layout. If you're looking for an example that using
posts
layout,
please take a look at the page
Markdown Syntax.
FAQ 頁面是一個常見問題的集合。
前置條件
我們需要在 content
目錄下創建一個名為 faq/index.md
的頁面。
1+++
2title = "Frequently Asked Questions"
3layout = "faq"
4+++
toml
數據
數據存放在 data
目錄,其目錄結構如下:
1data
2 /en
3 /faq
4 foo.json
5 bar.json
6 /zh-cn
7 /faq
8 foo.json
9 bar.json
text
如你所看到的,我們按照語言對問題進行歸類。每個文件代表一組問題,它們有著以下相同的格式:
1{
2 "title": "The group title",
3 "weight": 1,
4 "questions": [
5 {
6 "question": "The question",
7 "answer": "The answer"
8 }
9 ]
10}
json
評論