Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to add a stylesheet #65

Open
lolmaus opened this issue Dec 27, 2016 · 1 comment
Open

Ability to add a stylesheet #65

lolmaus opened this issue Dec 27, 2016 · 1 comment

Comments

@lolmaus
Copy link

lolmaus commented Dec 27, 2016

https://www.petefreitag.com/item/208.cfm

<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="http://you.com/rss.css" ?>
...
@dustinlarimer
Copy link

dustinlarimer commented Nov 7, 2023

@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).

Here's a great template for getting started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants