tightened up YAML structure and taxonomy for projects

This commit is contained in:
Brandon Rosage 2019-03-07 11:29:01 -06:00
parent 8231c9fe16
commit cc3202b525
2 changed files with 14 additions and 12 deletions

View file

@ -15,15 +15,15 @@ defaults:
values:
layout: "post"
projects_sort_by: pushed
# Options:
# - pushed
# - stars
exclude_forks: true
excluded_projects:
# - Your-Repo-Name
projects:
sort_by: pushed
# sort_by options:
# - pushed
# - stars
exclude:
forks: true
projects:
# - repo-name
topics:
- name: CSS

View file

@ -1,18 +1,20 @@
<h2 {% if site.style == 'dark' %}class="text-white"{% endif %}>My Projects</h2>
<p class="f4 mb-4 {% if site.style == 'dark' %}text-white{% else %}text-gray{% endif %}">GitHub repositories that I've built.</p>
<div class="d-sm-flex flex-wrap gutter-condensed mb-4">
{% if site.projects_sort_by == 'stars' %}
{% if site.projects.sort_by == 'stars' %}
{% assign sort_order = 'stargazers_count', 'last' %}
{% else %}
{% assign sort_order = 'pushed_at' %}
{% endif %}
{% if exclude_forks %}
{% if 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 %}
{% endif %}
{% for repository in filtered_repos | limit: 9 %}
{% unless site.excluded_projects contains repository.name %}
{% unless site.projects.exclude.projects contains repository.name %}
<div class="col-sm-6 col-md-12 col-lg-6 col-xl-4 mb-3">
{% include repo-card.html %}
</div>