jekyll-git_metadata icon indicating copy to clipboard operation
jekyll-git_metadata copied to clipboard

Get last commit of any file

Open Booligoosh opened this issue 7 years ago • 1 comments

Hi, is it possible to do the effect of page.git.last_commit but with any file (not necessarily the one you are on)?

For example something like

{% for file in site.static_files %}

console.log("FILE {{file.path}} LAST COMMIT: {{file.git.last_commit.short_sha}}");

{% endfor %}

This works for files with front-matter but not images, XML files etc.

Booligoosh avatar Aug 19 '17 05:08 Booligoosh

Hello! 👋

There isn't functionality to get git data for static files but that's a great idea and I think we should do it. I welcome any pull requests for this functionality!

ivantsepp avatar Aug 22 '17 01:08 ivantsepp