Skip to content

Commit

Permalink
docs: update search pages
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jul 1, 2022
1 parent 323673f commit 659825e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 29 deletions.
12 changes: 1 addition & 11 deletions exampleSite/content/docs/layouts/search/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,11 @@ It may be difficult for readers to retrieve an article in the case if there are

## Prerequisites

First of all, we need to append `JSON` to the `home` outputs in the configuration file.

```toml
[outputs]
home = ["HTML", "RSS", "JSON"]
```

> This step generates an index file `index.json`, in order to retrieve content by JavaScript.
Secondary, create a page called `search/_index.md` in the `content` directory.
All you need to do is create a page called `search/_index.md` in the `content` directory.

```toml
+++
title = "Search"
layout = "search"
+++
```

Expand Down
12 changes: 1 addition & 11 deletions exampleSite/content/docs/layouts/search/index.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,11 @@ aliases = [

## 前置条件

首先,我们需要在配置文件的 `home` 输出格式中追加 `JSON`

```toml
[outputs]
home = ["HTML", "RSS", "JSON"]
```

> 此步骤生成一个索引文件 `index.json`,以便 JavaScript 可以检索内容。
然后,在 `content` 目录下创建一个名为 `search/_index.md` 的页面。
你只需要在 `content` 目录下创建一个名为 `search/_index.md` 的页面。

```toml
+++
title = "Search"
layout = "search"
+++
```

Expand Down
11 changes: 4 additions & 7 deletions exampleSite/content/docs/layouts/search/index.zh-tw.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,14 @@ aliases = [

## 前置條件

首先,我們需要在設定檔的 `home` 輸出格式中追加 `JSON`
你只需要在 `content` 目錄下創建一個名為 `search/_ index.md` 的頁面

```toml
[outputs]
home = ["HTML", "RSS", "JSON"]
+++
title = "Search"
+++
```

> 此步驟生成一個索引檔案 `index.json`,以便 JavaScript 可以檢索內容。
然後,在 `content` 目錄下創建一個名為 `search/_ index.md` 的頁面。

## 網站參數

| 名稱 | 類型 | 預設值 | 描述
Expand Down

0 comments on commit 659825e

Please sign in to comment.