Skip to content

Read git log and add the properties `author` and `contributors` for each posts

Notifications You must be signed in to change notification settings

xcatliu/hexo-filter-author-from-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hexo-filter-author-from-git

Read git log and add the properties author and contributors for each posts.

A live site using this plugin: http://js-index.com/

And the GitHub repo for that site: https://github.com/xcatliu/js-index

Installation

$ npm install hexo-filter-author-from-git --save

Usage

The author property will be the user.name when the first time someone committed the post. Same result as:

git log --format="%an" -- <filePath> | tail -1

The contributors property will be the list of user.name of commits of the post. Same result as:

git log --reverse --format="%an" -- <filePath>

NOTICE: If you created a new file, before you committed the file, the author will be '' and the contributors will be [] when you run hexo command.

Options

Null

About

Read git log and add the properties `author` and `contributors` for each posts

Resources

Stars

Watchers

Forks

Packages

No packages published