Using GitHub Topics to Customize Repository Queries for My Website
8th Jul 2022 (Updated on 19th Dec 2024)
How I leveraged GitHub Topics with the GitHub API to query and display specific repositories on my website.
I was working on my website and I wanted to add a feature to query my GitHub repos but, I didn’t want ALL of my repos to be returned.
The first thing I did was look for a way to query repos so only some would be returned. On the repo’s screen, in the About
section, I noticed Topics
. After looking around a bit, I found that Topics were available through the GitHub API and could be used within a search.
Success! After some experimenting, I was able to return only repos that had featured-repo
as one of the topics.