A simple JS plugin for adding an RSS feed to your page
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
license.md Create license.md Oct 1, 2016
readme.md Update readme.md Oct 3, 2016
simple-rss.js

readme.md

Simple RSS Embed Plugin

About

This plugin allows you to embed content from an RSS feed on to your website using only data attributes directly in the HTML.

Usage

Add the plugin to your page, just before the </body> tag.

<script src="path/to/simple-rss.js"></script>

Create the container for the RSS feed to show in, and pass options in via data attributes.

<div 
    data-rss-feed="http://binonabin.tumblr.com/rss" 
    data-rss-link-titles="false" 
    data-rss-title-wrapper="h3" 
    data-rss-max="5">
</div>

Example

Options

data-rss-feed (required)

Specifies the RSS feed to pull content from

data-rss-link-titles (optional)

Specifies whether to link the titles to the original post.

default: true

data-rss-title-wrapper (optional)

Specifies the HTML element to wrap the titles.

default: h2

data-rss-max (optional)

Specifies the number of entries to output

default: 10