# hexo-generator-exindex

> Extenp hexo-generator-index to provide topping and hiding specified articles on the homepage through specified tags.

Latest version **1.0.3** (published 2023-06-02) · MIT license · 0 weekly downloads

## Install

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

## 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.3 |
| Published | 2023-06-02 |
| First published | 2023-06-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 2 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | isaaxite |
| Maintainers | isaacgan |
| Keywords | pin, top, hidden, hexo, generator |

## Links

- npm: https://www.npmjs.com/package/hexo-generator-exindex
- Repository: https://github.com/isaaxite/hexo-generator-exindex
- Homepage: https://github.com/isaaxite/hexo-generator-exindex#readme
- Issues: https://github.com/isaaxite/hexo-generator-exindex/issues
- npm.io page: https://npm.io/package/hexo-generator-exindex

## Dependencies (2)

- [object-assign](https://npm.io/package/object-assign.md) ^4.1.1
- [hexo-pagination](https://npm.io/package/hexo-pagination.md) ^3.0.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2023-06-02
- 1.0.2 — 2023-06-02
- 1.0.1 — 2023-06-02
- 1.0.0 — 2023-06-02

## README

# hexo-generator-exindex

[![license](https://img.shields.io/bower/l/MI)](https://github.com/isaaxite/hexo-generator-exindex/blob/main/LICENSE)
[![npm](https://img.shields.io/npm/v/hexo-generator-exindex)](https://www.npmjs.com/package/hexo-generator-exindex)
![version](https://img.shields.io/github/package-json/v/isaaxite/hexo-generator-exindex)
![languages-count](https://img.shields.io/github/languages/count/isaaxite/hexo-generator-exindex)
![code-size](https://img.shields.io/github/languages/code-size/isaaxite/hexo-generator-exindex)
![last-commit](https://img.shields.io/github/last-commit/isaaxite/hexo-generator-exindex)
![](https://img.shields.io/node/v/hexo-generator-exindex)


Extenp hexo-generator-index to provide topping and hiding specified articles on the homepage through specified tags.

# Installation

```shell
npm install hexo-generator-exindex --save
npm uninstall hexo-generator-index --save
```

**Hint:** If you have install `hexo-generator-index`, for avoiding conflict, you should unintall it.

# Feature

- include all of `hexo-generator-index` feat
- Pin-top
- pin-bottom
- exclude

## Config

The following is an example of a complete configuration.

```yml
exindex_generator_enable: true
exindex_generator:
  path: ''
  per_page: 10
  order_by: -date
  pagination_dir: page
  pin_top:
    tags: topping1,topping2
  pin_bottom:
    tags: bottoming1,bottoming2
  exclude:
    tags: hidden1,hidden2
```

## pin-top

Setting front-matter tags which you set in root _config.yml like that:

```yml
---
title: Isaac Blog
tags:
  - topping1
date: 2023-04-11 18:19:51
---
```

## pin-bottom

```yml
---
title: Isaac Blog
tags:
  - bottoming1
date: 2023-04-11 18:19:51
---
```

**Hint:** When pin-top and pin-bottom appear simultaneously, the latter has a higher priority.

## exclude

```yml
---
title: Isaac Blog
tags:
  - hidden1
date: 2023-04-11 18:19:51
---
```

# Options

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

```yml
exindex_generator_enable: true
exindex_generator:
  path: ''
  per_page: 10
  order_by: -date
  pagination_dir: page
  pin_top:
    tags: topping
  pin_bottom:
    tags: bottoming # exclude article which tag is Hexo, exp tags: <tag1>[,<tag2>,...]
```

- **exindex_generator_enable**: on or off this plugins.
- **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.
- **pin_top**: Bring the article to the top.
  - default: ""
  - `tags`: `<tag1>[,<tag2>,...]`, you need to set these tags at fron-matter!
- **pin_bottom**: Bring the article to the bottom.
  - default: ""
  - `tags`: `<tag1>[,<tag2>,...]`
- **exclude**: Hide corresponding articles through tags.
  - default: ""
  - `tags`: `<tag1>[,<tag2>,...]`

# License

[MIT](https://github.com/isaaxite/hexo-generator-exindex/blob/main/LICENSE) @ isaaxite

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