Skip to content

Add author from git history #4

@RangerMauve

Description

@RangerMauve

When parsing files it would be helpful to add author information from the git history.

Here's the data we need:

  • Who edited the file last
  • Who created the file
  • When it was last edited
  • When it was created

This data can be fetched from the git history.

Getting last author to edit the file

git log -1 --format="%an <%ae> on %ad" -- <filename>

Getting the original creator

git log --diff-filter=A --pretty=format:"%an" <filename>

This should be added to the footer of all pages and should be added to the HTML metadata.

<meta name="author" content="AUTHOR_HERE">

Check that we're in a git repo and have git installed before trying to get this info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions