Readme.rst 972 B

12345678910111213141516171819202122232425262728293031
  1. GitHub activity
  2. ---------------
  3. This plugin makes use of the `feedparser`_ library that you'll need to
  4. install.
  5. Set the ``GITHUB_ACTIVITY_FEED`` parameter to your GitHub activity feed.
  6. For example, to track Pelican project activity, the setting would be::
  7. GITHUB_ACTIVITY_FEED = 'https://github.com/getpelican.atom'
  8. On the template side, you just have to iterate over the ``github_activity``
  9. variable, as in this example::
  10. {% if GITHUB_ACTIVITY_FEED %}
  11. <div class="social">
  12. <h2>Github Activity</h2>
  13. <ul>
  14. {% for entry in github_activity %}
  15. <li><b>{{ entry[0] }}</b><br /> {{ entry[1] }}</li>
  16. {% endfor %}
  17. </ul>
  18. </div><!-- /.github_activity -->
  19. {% endif %}
  20. ``github_activity`` is a list of lists. The first element is the title,
  21. and the second element is the raw HTML from GitHub.
  22. .. _feedparser: https://crate.io/packages/feedparser/