Search code examples
githubjekyllliquidgithub-pages

List forks with Jekyll?


For a project I am trying to list all the forks with jekyll on github pages using this guide I found. I tried to edit the guide so it lists forks of the repo instead of the projects in my profile. This is probably an easy fix but the forks were not showing up on my profile. To make the forks show up I tried to do {% for repo in site.github.public_repositories.forks limit:28 %} instead of {% for repo in site.github.public_repositories limit:28 %}.

Thanks!

My full code


Solution

  • {% assign forked_repos = site.github.public_repositories | where: "fork", "true" %}
    
    {% for repo in forked_repos limit:28 %}
        <a href = "{{repo.html_url}}">{{repo.name}}</a><br>
    {% endfor %}