Uses GitHub API3 to aggregate community activity of open source projects
To grow an open-source community it helps if your site has an active overview of what's going on and who is contributing.
The GitHub API3 provides all the information we need, but you may hit rate-limiters, or find it hard / have no time to embed this data into your website.
This project aims to make it deadsimple to add community info & activity feeds to your project's site.
On the Githubs is a jquery plugin for a near-realtime overview of activity of a user, project or organisation. It does not require any buildsteps or setup, just add a few lines of code to your project's HTML.
Or your own:
To embed this into your site, add a few lines of code:
Don't forget to change the
data-event-source to repos/
For local development, here's how to run the repo-included demo:
npm install --devmake buildnode demo-server.js
Activity is limited to the last 20-100 events, but communities grow big. If you want to give credit where credit is due and show all the faces that make your community, we can't just pull that in in realtime from the API without hindering the UI or hitting GitHub's rate-limiter.
So this is something we have to aggregate, cache, and compile at your site's buildtime.
Get all people involved with
kvz/nsfailver and echo as json to
./bin/in-the-githubs --user kvz --repo nsfailover --format json --output -
Index an entire organization, read
test/about.md, search it for the
replace it with the entire
tus community, write it to
test/about-with-community.md, do this with
1 request at a time, to ensure the order of userpaths. Enable
debugging to see what's going on, because with the amount of API requests & GitHubs rate-limiting, this is going to take a while (the script automatically waits as to not have your IP banned by GitHub).
./bin/in-the-githubs \--user tus \--repo tus.io,tusd,tus-jquery-client,tus-ios-client,tus-android-client,tus-resumable-upload-protocol \--format html \--concurrency 1 \--input demo.html \--tag '<div class="in-the-githubs" />' \--output demo-with-community.html \--debug
Let's say your site is now built with Jekyll into
You have an
about.md that you want to add community faces to.
First, let's make on-the-githubs a dependency:
[ -d node_modules ] || mkdir node_modulesnpm install on-the-githubs --save
Now add something like this to a
community:node_modules/on-the-githubs/bin/in-the-githubs \--user tus \--repo tusd,tus-jquery-client \--format html \--concurrency 1 \--input _site/about.html \--tag '<p>replaced-by-in-the-githubs</p>' \--output _site/about.html \--debug
Now if you type
make community after
in-the-githubs will look for the
<p>replaced-by-in-the-githubs</p> placeholder, and replace it with all the involved GitHub
in-the-githubs caches to
~/.in-the-githubs/ to avoid rate-limiters.
This project is licensed under the MIT license, see