Skip to content

Commit a734d4a

Browse files
JDalshedivat
JD
andauthored
Github MetaData (alshedivat#121)
* 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 <alshedivat@users.noreply.github.com>
1 parent f92f466 commit a734d4a

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ group :jekyll_plugins do
33
gem 'github-pages'
44
gem 'jekyll'
55
gem 'jekyll-email-protect'
6+
gem 'jekyll-github-metadata'
67
gem 'jekyll-paginate-v2'
78
gem 'jekyll-scholar'
89
gem 'jekyll-twitter-plugin'

_config.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ exclude: [vendor]
111111
# Plug-ins
112112
plugins:
113113
- jekyll-email-protect
114+
- jekyll-github-metadata
114115
- jekyll-paginate-v2
115116
- jekyll/scholar
117+
- jekyll-twitter-plugin
116118
- jemoji
117-
- 'jekyll-twitter-plugin'
118119
# - bootstrap
119120
# - material-sass
120121

_posts/2020-09-28-github-metadata.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
layout: post
3+
title: a post with github metadata
4+
date: 2020-09-28 21:01:00
5+
description: a quick run down on accessing github metadata.
6+
---
7+
8+
A sample blog page that demonstrates the accessing of github meta data.
9+
10+
## What does Github-MetaData do?
11+
* Propagates the site.github namespace with repository metadata
12+
* Setting site variables :
13+
* site.title
14+
* site.description
15+
* site.url
16+
* site.baseurl
17+
* Accessing the metadata - duh.
18+
* Generating edittable links.
19+
20+
## Additional Reading
21+
* 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>.
22+
* Go through this <a href="https://jekyll.github.io/github-metadata/" target="blank">README</a> for more details on the topic.
23+
* <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.
24+
<br />
25+
26+
## Example MetaData
27+
* Host Name : {{ site.github.hostname }}
28+
* URL : {{ site.github.url }}
29+
* BaseURL : {{ site.github.baseurl }}
30+
* Archived : {{ site.github.archived}}
31+
* Contributors :
32+
{% for contributor in site.github.contributors %}
33+
* {{ contributor.login }}
34+
{% endfor %}

0 commit comments

Comments
 (0)