banner

How to embed a Twitter widgetΒΆ

Sphinx lets you use html code. Start an indented html block with .. raw:: html. So it is very easy to embed all kinds of widgets.

Use this code:

.. raw:: html

        <script src="http://widgets.twimg.com/j/2/widget.js"></script>
        <script>
        new TWTR.Widget({
          version: 2,
          type: 'profile',
          rpp: 4,
          interval: 6000,
          width: 175,
          height: 600,
          theme: {
            shell: {
              background: '#333333',
              color: '#ffffff'
            },
            tweets: {
              background: '#000000',
              color: '#ffffff',
              links: '#4aed05'
            }
          },
          features: {
            scrollbar: false,
            loop: false,
            live: false,
            hashtags: true,
            timestamp: true,
            avatars: false,
            behavior: 'all'
          }
        }).render().setUser('jeroenleijen').start();
        </script>

To get this Twitter Profile Widget:

Done


Published:Fri Jun 25 2010