hexo-gpt-tag
v1.2.1
Published
Automatically tag your Hexo posts with GPT|使用GPT自动为Hexo文章添加标签
Downloads
21
Maintainers
Readme
hexo-gpt-tag
Automatically generate article tags with GPT 中文文档
Installation
npm install hexo-gpt-tag
Usage
- Add the following to your Hexo site's
_config.yml
file:
gpt_tag:
enable: true
apiKey: <YOUR OPENAI API KEY>
override: true # whether to override existing tags
max_tags: 5 # Generate at most how many tags
max_tokens: 2048 # The maximum number of blog tokens used to send to gpt
model: gpt-4o-mini # The gpt model to use
You can get your API key from here. It may require a paid plan to use the API.
- Run the following command when ready to generate your site:
hexo clean && hexo generate
Make sure to run BOTH hexo clean
and hexo generate
.
- Tags will not be regenerated if blog post is not changed. Remove
./.cache
folder and generate your site if you want to regenerate tags even if blog post is not changed.