Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
uiolee committed Apr 18, 2024
1 parent 5a06933 commit 865028e
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,35 @@ It generates an archive of posts on your homepage, according to the `index` or `

## Installation

``` bash
$ npm install hexo-generator-index --save
```bash
npm install hexo-generator-index --save
```

## Options

Add or modify the following section to your root _config.yml file
Add or modify the following section to your root `_config.yml` file.

``` yaml
```yaml
index_generator:
path: ''
path: ""
per_page: 10
order_by: -date
pagination_dir: page
layout: ["index", "archive"]
```
- **path**: Root path for your blog's index page.
- default: ""
- **path**: Root path for your blog's index page.
- default: `""`
- **per_page**: Posts displayed per page.
- default: [`config.per_page`](https://hexo.io/docs/configuration.html#Pagination) as specified in the official Hexo docs (if present), otherwise `10`
- `0` disables pagination
- **order_by**: Posts order.
- default: date descending
- `0` disables pagination.
- **order_by**: Posts order.
- default: `-date` (date descending)
- **pagination_dir**: URL format.
- default: 'page'
- `awesome-page` makes the URL ends with 'awesome-page/<page number>' for second page and beyond.
- default: `page`
- e.g. set `awesome-page` makes the URL ends with `awesome-page/<page number>` for second page and beyond.
- **layout**: custom layout.
- defalut: `["index", "archive"]`

## Usage

Expand Down

0 comments on commit 865028e

Please sign in to comment.