diff options
author | Philip Hofstetter <phofstetter@sensational.ch> | 2011-08-04 21:24:48 +0200 |
---|---|---|
committer | Philip Hofstetter <phofstetter@sensational.ch> | 2011-08-04 21:27:58 +0200 |
commit | 16bb7729ec740c1bc5d327aa5ac32bbff7a1afff (patch) | |
tree | 5236ee9d11604305d161c8bf7fcfaf7fe62e29ef /.themes/classic | |
parent | 2e1f0c0bfc8d6f7cbc70a753e5424dbfb30b4d44 (diff) | |
download | my_new_personal_website-16bb7729ec740c1bc5d327aa5ac32bbff7a1afff.tar.xz my_new_personal_website-16bb7729ec740c1bc5d327aa5ac32bbff7a1afff.zip |
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
Diffstat (limited to '')
-rw-r--r-- | .themes/classic/source/_includes/asides/github.html | 1 | ||||
-rw-r--r-- | .themes/classic/source/javascripts/github.js | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/.themes/classic/source/_includes/asides/github.html b/.themes/classic/source/_includes/asides/github.html index 74f8ea95..935ccff0 100644 --- a/.themes/classic/source/_includes/asides/github.html +++ b/.themes/classic/source/_includes/asides/github.html @@ -20,6 +20,7 @@ github.showRepos({ user: '{{site.github_user}}', count: {{site.github_repo_count}}, + skip_forks: {{site.github_skip_forks}}, target: '#gh_repos' }); }); diff --git a/.themes/classic/source/javascripts/github.js b/.themes/classic/source/javascripts/github.js index 8af51486..79c60d1b 100644 --- a/.themes/classic/source/javascripts/github.js +++ b/.themes/classic/source/javascripts/github.js @@ -18,8 +18,9 @@ github = (function(){ var repos = []; var i; for (i = 0; i < data.repositories.length; i++){ - if (!data.repositories[i].fork) - repos.push(data.repositories[i]); + if (options.skip_forks && !data.repositories[i].fork) + continue; + repos.push(data.repositories[i]); } repos.sort(function(a, b){ var a = new Date(a.pushed_at), |