Exposing information of all repositories through site built with github pages

I am trying to create a github pages website for a company. I want to provide browsing facility for company’s all github repositories in this website. For example, people should be able to search repositories based on tags. I know this is something github provides out of the box. But still want to know if we can have such functionality exposed through github pages, possibly allowing some customization to functionality. Is their any jekyll plugin available for this or similar functionality? Also is there any jekyll plugin (or any other mechanism) available for showing / presenting any other info of all github repositories (not particular github repository) on website built using github pages?

PS: Am new to github pages.

Hi.

Ah interesting question I have a similar need for my own projects and I am working on them so am happy to give tips and to add to my plugin to make it reusable for you.

I have a 3-part answer in increasing levels of complexity but i believe the third part gives you mostn of what you need - a plugin to get repos by topic (e.g. #jekyll) and show data as a Jekyll site. (A tag would be 1.0.0, so labels/tags are topics.)

Jekyll GH metadata

Firstly there is a Jekyll plugin which requests to github API to get data about your own user and your repos. (I don’t know how this works for any org or more than 100 repos).

You can add to your Gemfile as

gem install 'jekyll-github-metadata`

And to your config

plugins:
  - jekyll-github-metadata

And you can it works on GithubPages.

(You don’t even need API credentials to run it locally. It uses IP address so eventually you get throttled.)

1 Like

Personal dev site

When you create a new github account you get a dev portfolio created for you. This uses the plugin I mentioned above.

Here is my fork of it linked below. I don’t like the architecture of the project but it showcases using the plugin from the previous heading. I recommend looking at the live site in the top right and if you want to experiment you can fork this or the original in the top left.

Plugin for showing topic data

Finally, how to handle topic data.

The base data stored in the above sections is arranged by repo and does not have topic labels.

So I learnt how to do Ruby and used my Python Github GraphQL experience to build a plugin which gets 100 most recent repos from Github for the current user (you could adapt it to get for an org instead) and arranges them as topic labels first with repos nested within.

I made the data available for templating so I can iterate over it to build tiles, grouped by topic:

https://michael-currin.netlify.app/all_topics.html

You get fork and star counts next to each.
For bonus points, I added commit count for each repo which is something github UI doesn’t give :slight_smile:

I also kept the data by repo. And added JS to filter by name…

https://michael-currin.netlify.app/all_repos.html

In a later version I am thinking of making a droplist or radio buttons for selecting topics and then just one repo view.

Here is the repo. :slight_smile: There is a plugin script to fetch data using .gql file, another handles restructuring the data and another handles setting the data on jekyll namespace.

Limitations:

  • The Ruby plugin is not well written (I talked to someone today on how to refactor it).
  • it is not installable alone.
  • it only works on Netlify at the moment, not GH Pages.

But I really hope you find my project useful in some way. If this is something you can use, you can pick out the pieces you need or fork the entire repo.

For a more maintainable approach, I’d also be happy to spend time on the next few weekends resolving the limitations covered above.
And taking features requests like if you wanted more fields. Or page over more than 100 repos. Or add Language field.