added support for customizable limit; added supporting docs

This commit is contained in:
Brandon Rosage 2019-03-07 11:47:11 -06:00
parent 4ca9974abc
commit 87e94a7ca9
3 changed files with 14 additions and 1 deletions

View file

@ -73,6 +73,18 @@ Your website will display in a two-column layout by default on larger-screen dev
Your website appears with a "light" white and gray background by default, with dark text. You can quickly switch to a "dark" background with white text by changing the line in your `_config.yml` file that reads `style: light` to `style: dark`.
#### Projects
The "My Projects" section of your website is generated by default with your nine most recently "pushed" repositories. It also excludes repositories that you forked, by default. But each of these parameters can be quickly customized in your repository's `_config.yml` file, under the `projects` dictionary line.
Parameters include:
- `sort_by`: The method by which repositories are sorted. Options include `pushed` and `stars`.
- `limit`: The maximum number of repositories that will be displayed in the "My Projects" section of your website. Out of the box, this number is set to `9`.
- `exclude`:
- `forks`: When `true`, repositories you've forked will be excluded from the listing.
- `projects`: A list the repository names you want to exclude from the listing.
#### Topics
Your website comes pre-configured with three topics (e.g. "Web design" and "Sass") that appear in a section titled "My Interests." These are also stored in your repository's `_config.yml` file, where you can define each topic's name and two other optional details:

View file

@ -21,6 +21,7 @@ projects:
# sort_by options:
# - pushed
# - stars
limit: 9
exclude:
forks: true
projects:

View file

@ -13,7 +13,7 @@
{% assign filtered_repos = site.github.public_repositories | sort: sort_order | reverse %}
{% endif %}
{% for repository in filtered_repos | limit: 9 %}
{% for repository in filtered_repos | limit: site.projects.limit %}
{% 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 %}