Browse Source

make listing/not listing of forks configurable

some people have more or less taken over projects with their forks, so
it probably makes sense to still list them among the repositories
unreleased_contents
Philip Hofstetter 13 years ago
parent
commit
16bb7729ec
  1. 1
      .themes/classic/source/_includes/asides/github.html
  2. 5
      .themes/classic/source/javascripts/github.js

1
.themes/classic/source/_includes/asides/github.html

@ -20,6 +20,7 @@
github.showRepos({ github.showRepos({
user: '{{site.github_user}}', user: '{{site.github_user}}',
count: {{site.github_repo_count}}, count: {{site.github_repo_count}},
skip_forks: {{site.github_skip_forks}},
target: '#gh_repos' target: '#gh_repos'
}); });
}); });

5
.themes/classic/source/javascripts/github.js

@ -18,8 +18,9 @@ github = (function(){
var repos = []; var repos = [];
var i; var i;
for (i = 0; i < data.repositories.length; i++){ for (i = 0; i < data.repositories.length; i++){
if (!data.repositories[i].fork) if (options.skip_forks && !data.repositories[i].fork)
repos.push(data.repositories[i]); continue;
repos.push(data.repositories[i]);
} }
repos.sort(function(a, b){ repos.sort(function(a, b){
var a = new Date(a.pushed_at), var a = new Date(a.pushed_at),

Loading…
Cancel
Save