hexo-tag-book-douban
A tag to display the information of Douban books in hexo post/page.
Feature
- Rendering book information according to book ISBN
- Responsive design
How to use
- Install
npm i hexo-tag-book-douban --save
- Import
# Hexo/source/_posts/xxx.md {% dbook [ISBN] %}
The {% dbook %}
options are shown below:
Option | Default | Description |
---|---|---|
ISBN | required | New version of ISBN, consisting of 13 pure numbers without- |
width | 40% | component width |
- (Optional) Config The default config:
# Hexo/_config.ymldbook: enable: true # Recommended to set it to false during `hexo server` and open during `hexo generate` to reduce requests. proxy: https://douban.uieee.com # Current limit that everyone shares : 10000 times / 1 hour powered: true
Sample:
{% dbook 4913064 40% %}
Screenshot:
Dependencies
- axios => GET book data
- ejs => render template
- Douban API Proxy => A proxy service of Douban API
Troubleshoot
- Theme-next
_data/next.yml
config doesn't work Issue #1
If there are other bugs, please feedback through issues or connect: me@makergyt.com
Todo
- Support other data sources to avoid official interface offline
License
MIT License
Reference
- hexo-tag-douban: Didn't work because official interface requires authorization.