Skip to content

Commit

Permalink
Github MetaData (alshedivat#121)
Browse files Browse the repository at this point in the history
* Feature Request : alshedivat#85

* Added github-metadata dependency :  https://github.com/jekyll/github-metadata

 * Created sample blog quickly going over Github MetaData.

Co-authored-by: Maruan <[email protected]>
  • Loading branch information
JD and alshedivat authored Oct 3, 2020
1 parent f92f466 commit a734d4a
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ group :jekyll_plugins do
gem 'github-pages'
gem 'jekyll'
gem 'jekyll-email-protect'
gem 'jekyll-github-metadata'
gem 'jekyll-paginate-v2'
gem 'jekyll-scholar'
gem 'jekyll-twitter-plugin'
Expand Down
3 changes: 2 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ exclude: [vendor]
# Plug-ins
plugins:
- jekyll-email-protect
- jekyll-github-metadata
- jekyll-paginate-v2
- jekyll/scholar
- jekyll-twitter-plugin
- jemoji
- 'jekyll-twitter-plugin'
# - bootstrap
# - material-sass

Expand Down
34 changes: 34 additions & 0 deletions _posts/2020-09-28-github-metadata.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
layout: post
title: a post with github metadata
date: 2020-09-28 21:01:00
description: a quick run down on accessing github metadata.
---

A sample blog page that demonstrates the accessing of github meta data.

## What does Github-MetaData do?
* Propagates the site.github namespace with repository metadata
* Setting site variables :
* site.title
* site.description
* site.url
* site.baseurl
* Accessing the metadata - duh.
* Generating edittable links.

## Additional Reading
* If you're recieving incorrect/missing data, you may need to perform a Github API<a href="https://github.com/jekyll/github-metadata/blob/master/docs/authentication.md"> authentication</a>.
* Go through this <a href="https://jekyll.github.io/github-metadata/" target="blank">README</a> for more details on the topic.
* <a href= "https://github.com/jekyll/github-metadata/blob/master/docs/site.github.md">This page</a> highlights all the feilds you can access with github-metadata.
<br />

## Example MetaData
* Host Name : {{ site.github.hostname }}
* URL : {{ site.github.url }}
* BaseURL : {{ site.github.baseurl }}
* Archived : {{ site.github.archived}}
* Contributors :
{% for contributor in site.github.contributors %}
* {{ contributor.login }}
{% endfor %}

0 comments on commit a734d4a

Please sign in to comment.