Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 2
Message 1 of 4

populating a Jekyll template with pinned repos

I am wondering if anyone can confirm if I am able to use the github api in Jekyll to populate a page with my pinned repos. The purpose is to display my pinned repos on something like a project page, to display what I have been working on.

 

 

3 Replies
Community Manager
Message 2 of 4

Re: populating a Jekyll template with pinned repos

Jekyll is a static site generator. What this means is that when you execute a Jekyll build, it creates HTML files that do not change until you run another Jekyll build. So, yes, you can query the GitHub API during the Jekyll build process to create an HTML page that contains your pinned repositories. But once that build process is complete, that list will not change until you run the build process again.

 

Let us know if you have more questions.

Copilot Lvl 2
Message 3 of 4

Re: populating a Jekyll template with pinned repos

This would be fine I think as ill keep updating the post section, so can always build or re build when I have a new project. 

 

Question is now...how can I do it :D 

Community Manager
Message 4 of 4

Re: populating a Jekyll template with pinned repos

You can write a simple Jekyll plugin like this one that I use to generate a dynamic copyright year. You would use octokit to grab the information you want and then format the output however you wish.

 

I hope that helps.