Eleventy project logo

Eleventy GitHub Repositories Plugin

Print Friendly and PDF

Posted: December 27, 2023 | Categories: Eleventy

As I wrote in Adding a GitHub Repository List to an Eleventy Site and Adding a GitHub Repository List to an Eleventy Site (part 2), I've been playing around with generating a GitHub repository list in an Eleventy site.

Both posts show how to do it with the first post demonstrating how to use unauthenticated access and the second authenticated access to the GitHub repos API. Both approaches required modifying the code and what I ultimately wanted was the ability to implement this capability as a plugin and therefore make it more easily configurable.

I created a plugin, but I just couldn't get it to work and it seemed like Eleventy wasn't allowing me to call asynchronous code from a plugin. Well, it turned out that it was just developer stupidity (me) and after I had some success with the Eleventy File List Plugin I decided to go back and it and I figured it out.

Anyway, I published the plugin today along with a demonstration Eleventy site (I love how easy it is to bundle an Eleventy Plugin and site into the same repository); it's available on GitHub at Eleventy Plugin GitHub Repositories and npm at eleventy-plugin-github-repos. I'll add both plugins to the Eleventy Plugin page before the end of the year.


Next Post: Updated My Eleventy New Post Module

Previous Post: Eleventy File List Plugin

If this content helps you in some way, please consider buying me a coffee.

Header image: Eleventy Project Home Page.