|
1 | 1 | # vue-rss-feed
|
| 2 | +A simple componenet to embed beautiful RSS feeds with Vuejs |
2 | 3 |
|
3 | | -## Project setup |
| 4 | +## Demo |
| 5 | +[demo](https://rssapp.github.io/vue-rss-feed/) |
4 | 6 |
|
5 | | -``` |
6 | | -npm install |
| 7 | +## Install |
| 8 | + |
| 9 | +```bash |
| 10 | +npm i vue-rss-feed |
7 | 11 | ```
|
8 | 12 |
|
9 | | -### Compiles and hot-reloads for development |
| 13 | +## Usage |
| 14 | +Import VueRssFeed in your component |
10 | 15 |
|
11 | | -``` |
12 | | -npm run serve |
| 16 | +```js |
| 17 | +import VueRssFeed from "../VueRssFeed.vue"; |
| 18 | +... |
| 19 | +export default { |
| 20 | + name: "Demo", |
| 21 | + components: { |
| 22 | + VueRssFeed |
| 23 | + }, |
| 24 | + data() { |
| 25 | + return { |
| 26 | + feedUrl: "https://rss.app/feeds/hmsyAr3PyniBpmOd.xml", |
| 27 | + name: "", |
| 28 | + limit: 5, |
| 29 | + }; |
| 30 | + }, |
| 31 | +}; |
13 | 32 | ```
|
14 | 33 |
|
15 | | -### Compiles and minifies for production |
| 34 | +Then use it in the template |
16 | 35 |
|
17 | | -``` |
18 | | -npm run build |
| 36 | +```HTML |
| 37 | +<template> |
| 38 | +... |
| 39 | +<div> |
| 40 | + <VueRssFeed :feedUrl="feedUrl" :name="name" :limit="limit"/> |
| 41 | +</div> |
| 42 | +... |
| 43 | +</template> |
19 | 44 | ```
|
20 | 45 |
|
21 | | -### Run your tests |
| 46 | +##Props |
22 | 47 |
|
23 | | -``` |
24 | | -npm run test |
25 | | -``` |
26 | 48 |
|
27 | | -### Lints and fixes files |
| 49 | +| name | type | default | description | |
| 50 | +| --------------- | -------------------------------- | ---------- | ---------------------------------------------------------------------- | |
| 51 | +| feedUrl | String | | RSS Feed URL | |
| 52 | +| limit | Number | 5 | Number of items to render | |
| 53 | +| Name | String | | Pass a name to show instead of feed title | |
| 54 | + |
28 | 55 |
|
29 | | -``` |
30 | | -npm run lint |
31 | | -``` |
|
0 commit comments