File tree Expand file tree Collapse file tree 6 files changed +83
-5
lines changed Expand file tree Collapse file tree 6 files changed +83
-5
lines changed Original file line number Diff line number Diff line change 1
1
_site
2
2
.sass-cache
3
3
.jekyll-metadata
4
+ .DS_Store
4
5
node_modules
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ gem "minima", "~> 2.0"
20
20
21
21
# If you have any plugins, put them here!
22
22
group :jekyll_plugins do
23
+ gem 'hash-joiner'
23
24
gem "jekyll-feed" , "~> 0.6"
24
25
gem 'jekyll-sitemap'
25
26
end
Original file line number Diff line number Diff line change 6
6
colorator (1.1.0 )
7
7
ffi (1.9.18 )
8
8
forwardable-extended (2.6.0 )
9
+ hash-joiner (0.0.7 )
10
+ safe_yaml
9
11
jekyll (3.3.1 )
10
12
addressable (~> 2.4 )
11
13
colorator (~> 1.0 )
@@ -47,13 +49,14 @@ PLATFORMS
47
49
ruby
48
50
49
51
DEPENDENCIES
52
+ hash-joiner
50
53
jekyll (= 3.3.1 )
51
54
jekyll-feed (~> 0.6 )
52
55
jekyll-sitemap
53
56
minima (~> 2.0 )
54
57
55
58
RUBY VERSION
56
- ruby 2.3.1p112
59
+ ruby 2.3.3p222
57
60
58
61
BUNDLED WITH
59
62
1.14.6
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ twitter_username: "@hdjirdeh"
23
23
github_username : " housseindjirdeh"
24
24
google_analytics : UA-66348622-4
25
25
26
+ # API
27
+ jekyll_get :
28
+ data : contributorResponse
29
+ json : ' https://raw.githubusercontent.com/gitpoint/git-point/master/.all-contributorsrc'
30
+
26
31
# Build settings
27
32
markdown : kramdown
28
33
gems :
Original file line number Diff line number Diff line change 1
- < footer class ="pv4 ph3 ph5-m ph6-l dark-gray bg-primary karla ">
2
- < div class ="f5 f4-ns db tc mt2 mb4 "> Brought to you by < a class ="link fw7 dark-gray dim " href ="https://houssein.me/ "> Houssein Djirdeh</ a > and < a class ="link fw7 dark-gray dim " href ="https://github.com/gitpoint/git-point/graphs/contributors "> awesome contributors 🎉</ a > </ div >
3
- < div class ="f6 f5-ns db tc "> Show this project some ❤ on < a class ="link fw7 dark-gray dim " href ="https://github.com/gitpoint/git-point "> GitHub</ a > </ div >
4
- </ footer >
1
+ < footer class ="tc pv4 pv4-ns flex flex-column items-center avenir bt b--black-10 ">
2
+ < h3 class ="f5 f4-ns fw4 dark-gray "> Brought to you by</ h3 >
3
+
4
+ < div class ="flex flex-column flex-wrap flex-row-ns justify-between center w-100 w-90-l ">
5
+
6
+ {% for contributor in site.data.contributorResponse.contributors%}
7
+ {% assign loopindex = forloop.index | modulo: 2 %}
8
+ {% if loopindex == 1 %}
9
+ < div class ="flex flex-column items-center mv3 w-100 w-50-m w-auto-l ">
10
+ < div >
11
+ < a class ="link " href ={{ contributor.profile }} >
12
+ < img src ={{ contributor.avatar_url }} class ="grow-large pa1 ba b--black-10 br-100 h3 w3 " alt ={{ contributor.name }} >
13
+ </ a >
14
+
15
+ {% assign name = contributor.name | split: %}
16
+ < h4 class ="f6 mid-gray fw4 ttu tracked "> {{ name[0] }}</ h4 >
17
+ </ div >
18
+ {% else %}
19
+ < div >
20
+ < a class ="link " href ={{ contributor.profile }} >
21
+ < img src ={{ contributor.avatar_url }} class ="grow-large pa1 ba b--black-10 br-100 h3 w3 " alt ={{ contributor.name }} >
22
+ </ a >
23
+
24
+ {% assign name = contributor.name | split: %}
25
+ < h4 class ="f6 mid-gray fw4 ttu tracked "> {{ name[0] }}</ h4 >
26
+ </ div >
27
+ </ div >
28
+ {% endif %}
29
+ {% endfor %}
30
+
31
+ </ div >
32
+ </ footer >
Original file line number Diff line number Diff line change
1
+ require 'json'
2
+ require 'hash-joiner'
3
+ require 'open-uri'
4
+
5
+ module Jekyll_Get
6
+ class Generator < Jekyll ::Generator
7
+ safe true
8
+ priority :highest
9
+
10
+ def generate ( site )
11
+ config = site . config [ 'jekyll_get' ]
12
+ if !config
13
+ return
14
+ end
15
+ if !config . kind_of? ( Array )
16
+ config = [ config ]
17
+ end
18
+ config . each do |d |
19
+ begin
20
+ target = site . data [ d [ 'data' ] ]
21
+ source = JSON . load ( open ( d [ 'json' ] ) )
22
+ if target
23
+ HashJoiner . deep_merge target , source
24
+ else
25
+ site . data [ d [ 'data' ] ] = source
26
+ end
27
+ if d [ 'cache' ]
28
+ data_source = ( site . config [ 'data_source' ] || '_data' )
29
+ path = "#{ data_source } /#{ d [ 'data' ] } .json"
30
+ open ( path , 'wb' ) do |file |
31
+ file << JSON . generate ( site . data [ d [ 'data' ] ] )
32
+ end
33
+ end
34
+ rescue
35
+ next
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
You can’t perform that action at this time.
0 commit comments