Skip to content

Commit

Permalink
feat: add api-page doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sanyuan0704 committed Oct 7, 2022
1 parent ee9aa67 commit 1d15083
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/en/guide/api-page.md
@@ -1 +1,22 @@
# API Page

The Island.js default theme has an built-in API page.

Suppose your project has the following directory structure:

```bash
api
├── config-basic.md
├── config-extension.md
└── index.md
```

Then you just need to add the following to `index.md` in the `api` directory:

```md
---
pageType: api
---
```

In this way, Island.js will automatically parse the document structure of other subpages in the directory for you, extract the title (h1, h2) information, and generate the API page.
21 changes: 21 additions & 0 deletions docs/zh/guide/api-page.md
@@ -1 +1,22 @@
# API 页面

Island.js 默认主题内置了 API 页面。

假如你的项目中有如下的目录结构:

```bash
api
├── config-basic.md
├── config-extension.md
└── index.md
```

那么你只需要在 `api` 目录中的 `index.md` 中添加如下的内容即可:

```md
---
pageType: api
---
```

这样 Island.js 会自动为你解析该目录下其它子页面的文档结构,提取出其中的标题(h1、h2)信息,并生成 API 页面。

1 comment on commit 1d15083

@vercel
Copy link

@vercel vercel bot commented on 1d15083 Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.