Improve contributors.rb plugin

Validate returned data from GitHub API
htmlescape data on the HTML page
Drop unnecessary yaml dependency
Add more comments in the code
Add more aliases in _config.yml
Fix vertical-align style
This commit is contained in:
Saivann 2014-06-06 15:33:16 -04:00
parent f6f85b4447
commit 187ed2562a
4 changed files with 68 additions and 33 deletions

View file

@ -77,7 +77,7 @@ id: development
<div class="contributors">{% for c in site.contributors %}
<span>
{% if c.gravatar_id %}<img class="icon" height="16" width="16" src="https://secure.gravatar.com/avatar/{{c.gravatar_id}}?s=140&amp;d=mm" alt="icon" />{% else %}<img class="icon" height="16" width="16" alt="icon" />{% endif %}
{% if c.login %}<a href="https://github.com/{{c.login}}">{{ c.name }} ({{ c.contributions }})</a>{% else %}{{ c.name }} ({{ c.contributions }}){% endif %}
{% if c.login %}<a href="https://github.com/{{c.login}}">{{ c.name | htmlescape }} ({{ c.contributions }})</a>{% else %}<a>{{ c.name | htmlescape }} ({{ c.contributions }})</a>{% endif %}
</span>{% endfor %}
</div>
</section>