{"id":13612402,"url":"https://github.com/ivantsepp/jekyll-git_metadata","last_synced_at":"2025-08-12T16:38:32.224Z","repository":{"id":56878575,"uuid":"21039143","full_name":"ivantsepp/jekyll-git_metadata","owner":"ivantsepp","description":"Expose Git metadata to Jekyll.","archived":false,"fork":false,"pushed_at":"2018-10-07T20:28:55.000Z","size":65,"stargazers_count":67,"open_issues_count":8,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-02T03:55:47.881Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivantsepp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-20T13:39:02.000Z","updated_at":"2024-01-15T07:02:19.000Z","dependencies_parsed_at":"2022-08-20T23:10:21.003Z","dependency_job_id":null,"html_url":"https://github.com/ivantsepp/jekyll-git_metadata","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantsepp%2Fjekyll-git_metadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantsepp%2Fjekyll-git_metadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantsepp%2Fjekyll-git_metadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantsepp%2Fjekyll-git_metadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivantsepp","download_url":"https://codeload.github.com/ivantsepp/jekyll-git_metadata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238044095,"owners_count":19407128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:00:29.353Z","updated_at":"2025-02-10T02:11:48.714Z","avatar_url":"https://github.com/ivantsepp.png","language":"Ruby","funding_links":[],"categories":["Generators","Ruby"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ivantsepp/jekyll-git_metadata.svg?branch=master)](https://travis-ci.org/ivantsepp/jekyll-git_metadata)\n\n# Jekyll::GitMetadata\n\nExpose Git metadata to Jekyll. Just like how Github exposes [repository metadata](https://help.github.com/articles/repository-metadata-on-github-pages), this plugin will expose information about your git repository for your templates. For example:\n\n```\n{{site.git.total_commits}} # =\u003e Will return the total number of commits for your Jekyll repository\n```\n\n## Installation\n\nAdd to your `Gemfile`:\n\n```\ngem 'jekyll-git_metadata'\n```\n\nAdd to your `_config.yml`:\n\n```yml\ngems:\n  - jekyll-git_metadata\n```\n\n## Usage\n\nThis plugin adds a hash of git information to the `site` and `page` variables. The hash looks something like this:\n\n```\n{\"authors\"=\u003e\n  [\n   {\"commits\"=\u003e2, \"name\"=\u003e\"Ivan Tse\", \"email\"=\u003e\"ivan@example.com\"},\n   {\"commits\"=\u003e5, \"name\"=\u003e\"John Smith\", \"email\"=\u003e\"john@example.com\"}\n  ],\n \"total_commits\"=\u003e7,\n \"total_additions\"=\u003e57,\n \"total_subtractions\"=\u003e22,\n \"first_commit\"=\u003e\n  {\"short_sha\"=\u003e\"d15cbe8\",\n   \"long_sha\"=\u003e\"d15cbe8d0f4d4db9efda7a3daabbe966c21f3848\",\n   \"author_name\"=\u003e\"John Smith\",\n   \"author_email\"=\u003e\"john@example.com\",\n   \"author_date\"=\u003e\"Thu Jan 16 23:36:00 2014 -0500\",\n   \"commit_name\"=\u003e\"John Smith\",\n   \"commit_email\"=\u003e\"john@example.com\",\n   \"commit_date\"=\u003e\"Thu Jan 16 23:36:00 2014 -0500\",\n   \"message\"=\u003e\"A commit!\"},\n \"last_commit\"=\u003e\n  {\"short_sha\"=\u003e\"f88ca3b\",\n   \"long_sha\"=\u003e\"f88ca3bff630efb6cdb356fad3d640534b109572\",\n   \"author_name\"=\u003e\"Ivan Tse\",\n   \"author_email\"=\u003e\"ivan@example.com\",\n   \"author_date\"=\u003e\"Mon Jul 14 04:04:47 2014 -0400\",\n   \"commit_name\"=\u003e\"John Smith\",\n   \"commit_email\"=\u003e\"john@example.com\",\n   \"commit_date\"=\u003e\"Mon Jul 14 04:04:47 2014 -0400\",\n   \"message\"=\u003e\"Fix some stuff\"}}\n```\n\nTo access this hash, use either `page.git` or `site.git`. `page.git` contains the git information about that particuliar page/file. `site.git` contains the git information for the entire git repository. `site.git` also includes `total_files` and `project_name` variables.\n\n## Contributing\n\n1. Fork it ( https://github.com/ivantsepp/jekyll-git_metadata/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\nSuggestions for more git metadata are welcomed!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantsepp%2Fjekyll-git_metadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivantsepp%2Fjekyll-git_metadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantsepp%2Fjekyll-git_metadata/lists"}