Socket
Socket
Sign inDemoInstall

vue-rss-widget

Package Overview
Dependencies
11
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vue-rss-widget

This unstyled component enables you to display any rssfeed ...anywhere in your app. It uses the RSS2JSON (https://rss2json.com/) service to transform the feed into json format. So, never forget to prefix your feed with https://api.rss2json.com/v1/api.json


Version published
Weekly downloads
7
Maintainers
1
Created
Weekly downloads
 

Readme

Source

vue-rss-widget

This unstyled component enables you to display any rssfeed ...anywhere in your app. It uses the RSS2JSON (https://rss2json.com/) service to transform the feed into json format. So, never forget to prefix your feed with https://api.rss2json.com/v1/api.json?rss_url= ...your feed.

While there is a free tier for this service, check other plans on RSS2JSON.

For the sake of simplicity, but also to let it be used with any UI framework, you will have to customize it with VUE SLOT api.

Here under you'll find an example of how to do it.

Check examples here under.

vue-rss-widget Jpeg

in order to install it in your project

npm install vue-rss-widget (or npm i vue-rss-widget)

then import the component where you need it

<template>
<div>
    <rss-widget>
      
      <template v-slot:feed_header="slotProps">
        <h2>{{slotProps.rssfeed.title}}</h2>
      </template>

      <template v-slot:feed_body="slotProps">
        <ul >
          <li v-for="(item,i) in slotProps.items" :key="i">
            <div class="card">
              <div class="card-header">
                  <h4>{{item.title}}</h4>
              </div>
              <div class="card-body">
                  {{item.description}}
              </div>
            </div>
          </li>
        </ul>
      </template>
    </rss-widget>
    </div>
</template>

<script>
import RssWidget from "vue-rss-widget"

export default {
    components: {
    RssWidget
    },
}

</script>
<style scoped>

</style>

Available props

PropTypeRequiredDefaultDescription
feedStringNOthe url of the feedProvide the full url of the feed

Slots

NameParamsInfo
feed_headeruse the vairable you want to retrieve data (ex.slotProps)you'll get rssfeed.title, rssfeed.image, rssfeed.description, rssfeed.url
feed_bodyuse the vairable you want to retrieve data (ex.slotProps)items {title,description,image,author,pubDate,categories[]}

see it on the great great Codesandbox

This example uses bootstrap-vue Edit vue-rss-widget

Version History

  • 0.1.0 First Working Version.

Keywords

FAQs

Last updated on 11 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc