Skip to content

Commit

Permalink
Merge pull request github#129 from ykzts/exclude-archived
Browse files Browse the repository at this point in the history
exclude archived repositories
  • Loading branch information
brandonrosage authored May 20, 2019
2 parents 949f46e + 46d5aa6 commit 746e8c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ projects:
# - stars
limit: 9
exclude:
archived: false
forks: true
projects:
# - repo-name
Expand Down
6 changes: 5 additions & 1 deletion _includes/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ <h2 {% if site.style == 'dark' %}class="text-white"{% endif %}>My Projects</h2>
{% assign sort_order = 'pushed_at' %}
{% endif %}

{% if site.projects.exclude.forks %}
{% if site.projects.exclude.archived && site.projects.exclude.forks %}
{% assign filtered_repos = site.github.public_repositories | where:'archived', false | where:'fork', false | sort: sort_order | reverse %}
{% elsif site.projects.exclude.archived %}
{% assign filtered_repos = site.github.public_repositories | where:'archived', false | sort: sort_order | reverse %}
{% elsif site.projects.exclude.forks %}
{% assign filtered_repos = site.github.public_repositories | where:'fork', false | sort: sort_order | reverse %}
{% else %}
{% assign filtered_repos = site.github.public_repositories | sort: sort_order | reverse %}
Expand Down

0 comments on commit 746e8c2

Please sign in to comment.