Permalink
Browse files

modified Github aside to ignore blog repositories specified in config

  • Loading branch information...
codebykat committed May 20, 2013
1 parent 7718a6c commit 6fad9a1a0342ef9a2424ea0b695677d844985f7f
Showing with 3 additions and 1 deletion.
  1. +1 −1 _config.yml
  2. +1 −0 source/_includes/asides/github.html
  3. +1 −0 source/javascripts/github.js
@@ -68,7 +68,7 @@ github_user: codebykat
github_repo_count: 5
github_show_profile_link: true
github_skip_forks: true
github_hide_blog_repo: true # will hide repos named github_user.github.com
github_skip_repos: [blog, codebykat.github.io]
# Twitter
twitter_user:
@@ -21,6 +21,7 @@ <h1>GitHub Repos</h1>
user: '{{site.github_user}}',
count: {{site.github_repo_count}},
skip_forks: {{site.github_skip_forks}},
skip_repos: [ {% for repo in site.github_skip_repos %}"{{repo}}"{% unless forloop.last %}, {% endunless %}{% endfor %} ],
target: '#gh_repos'
});
});
@@ -21,6 +21,7 @@ var github = (function(){
if (!data || !data.data) { return; }
for (var i = 0; i < data.data.length; i++) {
if (options.skip_forks && data.data[i].fork) { continue; }
if ( jQuery.inArray( data.data[i].name, options.skip_repos ) != -1) { continue; }
repos.push(data.data[i]);
}
if (options.count) { repos.splice(options.count); }

0 comments on commit 6fad9a1

Please sign in to comment.