hexo-bangumi-gallery
Version:
A Hexo plugin, show your anime list in your blog.
78 lines (61 loc) • 3.85 kB
Markdown
[简体中文](https://github.com/ChiyukiRuon/hexo-bangumi-gallery/blob/main/README.md) | English
A Hexo plugin, show your anime list in your blog. Support to get anime information from [bgm.tv](https://bgm.tv/) and [MyAnimeList](https://myanimelist.net/).
There are two styles to choose for display. In `lite` mode, only the cover and *title (optional)* are displayed, while in `full` mode, more anime information will be displayed.
In `lite` mode, only the cover and title of the anime displayed. You can also choose to display only the cover.
You can also configure the interval between anime and the number of anime displayed per page in the configuration file. This is described in detail in the configuration section below.

In `full` mode, in addition to the cover and title, it will also display information such as introduction, number of episodes, ratings, air date, etc.

For the anime you are watching, you can choose whether to display the current progress in the anime information.

**ATTENTION: Due to the MyAnimeList API, you need to provide API Key when using MyAnimeList API to fetch anime information.
And when using MyAnimeList API to fetch anime information, you can only use `lite` mode.**
1. Install the plugin
In the blog project directory, run the following command to install the plugin:
```shell
npm install hexo-bangumi-gallery --save
```
2. Basic Configuration
Add the following configuration to the `_config.yml` file:
```yaml
bangumi_gallery:
enable: true
api: 'mal'
api_key: ''
user_id: ''
display:
title: 'Bangumi'
quote: 'Isshou bangumi shite kureru.'
index: 1
image_level: 'l'
size: 'lite'
name: true
margin: 10
page_size: 24
progress: true
lazyload: true
bangumi:
enable: true
path: /bangumi.html
```
> For advanced configuration, please refer to: https://bgmgallery.chiyukiruon.com/#/en/
3. Run
After add the configuration correctly, run the server. When running for the first time, the plugin will automatically fetch the anime information and cache it locally.
After fetching the data, visit `http://localhost:[port]/[path]` and you should be able to see the bangumi gallery page.
If you want to update the anime data, run the following command in project directory, and the anime data will be updated and cached.
```shell
hexo bangumi-gallery -u
```
- [Hexo](https://hexo.io/)
- [hexo-bangumis](https://github.com/mmdjiji/hexo-bangumis)
- [Bangumi API](https://bangumi.github.io/api/#/)
- [MyAnimeList API](https://myanimelist.net/apiconfig/references/api/v2)
[](https://github.com/ChiyukiRuon/hexo-bangumi-gallery/blob/main/LICENSE)