Skip to content

Automatically add tags to a post in a Hexo blog by checking the post for predefined keywords

License

Notifications You must be signed in to change notification settings

grevory/hexo-auto-tagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexo-auto-tagger

Build Status NPM version Coverage Status

Automatically add tags to a post in a Hexo blog by checking the post for predefined keywords.

Let's say you want to tag every article that references any province of Canada with that provinces name. You could add each province name to the tag keywords in your config and if that province name appears in an article's content a tag will be automatically added to that article.

Will not add duplicate tags.

NOTE: This is a work in progress. Please wait for version 1.0.0.

Installation

$ npm install hexo-auto-tagger --save

Requires tag_keywords in the config in order to work. See below.

Options

auto_tagger:
  tag_keywords:
  	- Gregory Pike
  	- Newfoundland & Labrador

tag_keywords: An array of keywords to search for in each post

Deploying Contributions

$ npm run prepush
$ git commit -am "Your commit message"
$ npm version patch|minor|major
$ git push origin master --tags

License

MIT

About

Automatically add tags to a post in a Hexo blog by checking the post for predefined keywords

Resources

License

Stars

Watchers

Forks

Packages

No packages published