# hexo-generator-page

> Index generator for Hexo.

Latest version **1.0.0** (published 2023-03-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install hexo-generator-page
pnpm add hexo-generator-page
yarn add hexo-generator-page
bun add hexo-generator-page
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-03-27 |
| First published | 2023-03-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.13.0 |
| Dependencies | 1 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | cloaks |
| Maintainers | cloaks |
| Keywords | hexo, generator, page |

## Links

- npm: https://www.npmjs.com/package/hexo-generator-page
- Homepage: http://cloaks.cn/
- npm.io page: https://npm.io/package/hexo-generator-page

## Dependencies (1)

- [hexo-pagination](https://npm.io/package/hexo-pagination.md) 1.0.0

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-03-27

## README

# hexo-generator-page

Page generator for [Hexo][Hexo].

It generates an archive of pages on your page, according to the `page` layout of your theme.

## Installation

```bash
$ npm install hexo-generator-page --save
```

## Options

Add or modify the following section to your root _config.yml file

```yaml
index_generator:
  path: ''
  per_page: 10
  order_by: -date
  pagination_dir: page
```

- **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
- **pagination_dir**: URL format.
  - default: 'page'
  - `awesome-page` makes the URL ends with 'awesome-page/`<page number>`' for second page and beyond.

## Usage

The `sticky` parameter in the post [Front-matter](https://hexo.io/docs/front-matter) will be used to pin the post to the top of the index page. Higher `sticky` means that it will be ranked first.

```yml
---
title: Hello World
date: 2013/7/13 20:46:25
sticky: 100
---
```

## Note

If your theme define a non-archive `index` layout (e.g. About Me page), this plugin would follow that layout instead and not generate an archive. In that case, use [hexo-generator-archive](https://github.com/hexojs/hexo-generator-archive) to generate an archive according to the `archive` layout.

## License

MIT

[Hexo]: http://hexo.io/

---
_Source: https://npm.io/package/hexo-generator-page · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
