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:
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
I also kept the data by repo. And added JS to filter by name…
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. 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.
- 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.