-
Is it possible to retrieve the topics for a repository in a theme? I would like to list all repositories which have a certain topic, but I haven’t been able to find a way to this. Is anyone aware of a method of doing this? Otherwise it might be a nice feature to add. An example of what it might look like:
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Something like this would most likely need to be a Jekyll plugin. You could search the list of GitHub repositories that have the jekyll-plugin topic perhaps? I didn’t find anything pre-made that seemed to fit what you’re going after, but perhaps there is something pre-made that will get you started? I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
I found an alternative method using the repository description rather than topics, but thanks for the suggestion! Here is what I’m doing in case anyone is interested : I’m adding “Category:<label>” at the end of the description and then using this to create arrays of repo names:
Then looping over these arrays I can make links. |
Beta Was this translation helpful? Give feedback.
-
I’d love to have topics available in the Repository Metadata. I assume the reason it’s not in there is because of the following disclaimer in the API documentation:
It would be neat if we could opt-in to preview features like this with something like preview: true in _config.yml. |
Beta Was this translation helpful? Give feedback.
-
If you have a feature that you’d like to suggest for Jekyll, which is how you would get a change to how the I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Since this feature is only relevant for GitHub Pages, I don’t think Jekyll is the correct recipient of such a feature request. A github node in _config.yml could probably be used to contain GitHub Pages related configuration. |
Beta Was this translation helpful? Give feedback.
-
repository.topics was made available in github-metadata version 2.13.0 by the following pull request. |
Beta Was this translation helpful? Give feedback.
I found an alternative method using the repository description rather than topics, but thanks for the suggestion!
Here is what I’m doing in case anyone is interested :
I’m adding “Category:<label>” at the end of the description and then using this to create arrays of repo names: