No description, website, or topics provided.
Ruby JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
public
views
.gitignore
Gemfile
Gemfile.lock
LICENSE
README.md
Rakefile
app.rb
config.ru

README.md

This project provides Twitter-style follow buttons for GitHub that you can place on your personal site... or anywhere you want, really.

Using the button

Place the following on your webpage where you want the button to appear:

<a href="https://github.com/YOURUSERNAME" class="github-follow-button">Follow Me On GitHub</a>
<script type="text/javascript" src="http://octophile.com/widgets.js"></script>

You can put as many anchor tags as you want on a given page, even with different usernames. You only need to include the script once, but it must come after all of the buttons on the page.

Running the app

Install the dependencies:

bundle install

You will need to register an application with GitHub. Set your client ID and client secret in your .bashrc or .bash_profile (or equivalents for whichever shell you use):

export GITHUB_CLIENT_ID=???
export GITHUB_CLIENT_SECRET=???

Run the app:

rackup -p 8080

Browse to http://localhost:8080

Deploying the app

Optimize the static files:

rake

This will copy all of the static content in the public folder to a folder named dist. All of the javascript files will be minified. Javascript and CSS files needed by the follow button iframe will be bundled into the iframe's HTML.

Make sure the app is run in the production environment so that the optimized files get used. To test that this works:

rackup -p 8080 -E production