node-rss
node-rss copied to clipboard
Ability to add a stylesheet
trafficstars
https://www.petefreitag.com/item/208.cfm
<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="http://you.com/rss.css" ?>
...
@lolmaus, and anyone looking for a workaround – try this:
const feed = new RSS({
/* config */
});
const response = feed.xml().replace(
`<?xml version="1.0" encoding="UTF-8"?>`,
`<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/pretty-feed-v3.xsl" type="text/xsl"?>`
)
console.log(response)
This response will now contain a reference to stylesheet (XSL).