Socket
Socket
Sign inDemoInstall

@notiz/scully-plugin-rss

Package Overview
Dependencies
293
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @notiz/scully-plugin-rss

scully plugin generate a RSS Feed XML


Version published
0
Maintainers
2
Install size
2.31 MB
Created
Weekly downloads
 

Readme

Source

scully-plugin-rss

npm version

scully-plugin-rss is a routeDiscoveryDone plugin for Scully. A RSS Feed is created from your content using feed and showdown.

The rss feed is available at:

  • your-domain.de/feed.json
  • your-domain.de/feed.atom
  • your-domain.de/feed.xml

To change the filename of the feed, use the filename attribute in your rss.config.json file, as seen below. The default value is feed, but you can change it to whatever you'd like.

Breaking Change introduced in Version 1.0.0 with changing the plugin type from render to routeDiscoveryDone. This has the major benefit of only generating the RSS Feed once per run instead of after each page render.

📦 Installation

Install the RSS Feed plugin using the command

npm install @notiz/scully-plugin-rss --save-dev

Note: routeDiscoveryDone plugin requires @scullyio/scully in version ^1.0.5 or above to correctly parse date values from markdown front matter.

Usage

Import the plugin in the Scully config file scully.app-name.config.ts:

import { ScullyConfig } from '@scullyio/scully';
import '@notiz/scully-plugin-rss';

export const config: ScullyConfig = {
  projectRoot: './src/app',
  routes: {
    ...
  },
};

It will run on only routes that include /blog unless specified otherwise in the rss.config.json file. The order of the posts will be oldest first unless the newestPostsFirst option is set in the config.

Create a rss.config.json in your root with the following properties:

{
  "title": "Your Title",
  "description": "Page description",
  "id": "https://your-domain.com",
  "link": "https://your-domain.com",
  "language": "en",
  "image": "https://your-domain.com/featured.png",
  "favicon": "https://you-domain.com/favicon.png",
  "copyright": "2020 your-domain.com",
  "generator": "Page description",
  "filename": "feed",
  "feedLinks": {
    "atom": "https://your-domain.com/feed.atom",
    "json": "https://your-domain.com/feed.json",
    "xml": "https://your-domain.com/feed.xml"
  },
  "outDir": "./dist/static",
  "categories": ["Categories", "of", "your", "choice"],
  "blogPostRouteSlug": "/blog",
  "newestPostsFirst": true
}

Each RSS Feed item attributes are currently assigned by the following scully route attributes.

RSS Feed ItemScully Route
titletitle
idslug
linkConfig Link + slug
descriptiondescription
contentarticleHTML
authorauthors
contributorauthors
dateupdatedAt |  publishedAt

Your content should have the following front matter in your scully content:

---
title: Martial Arts Training
description: Best Martial Arts Training
publishedAt: 2020-03-25T10:12:00.000Z
updatedAt: 2020-03-25T10:12:00.000Z
published: true
tags:
  - training
  - rss
authors:
  - Bruce Lee
---

Keywords

FAQs

Last updated on 17 Aug 2021

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