We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My code
` //feed const feed = new Feed ({ title: "Semente Feed", description: "O Feed RSS da Semente da Liberdade!", id: "https://sementedaliberdade.com.br/", link: "https:sementedaliberdade.com.br/", language: "pt-BR", image: "https://sementedaliberdade.com.br/images/SDL-05.png", favicon: "https://sementedaliberdade.com.br/images/SDL-05.png", update: new Date(), generator: "awesome", feedLinks: { json: "https://sementedaliberdade.com.br/json", atom: "https://sementedaliberdade.com.br/atom" } })
app.get("/feed", (req, res) => { Post.find({approved: true}).lean().then((posts) => { posts.forEach(post => { feed.addItem({ title: post.title, id: "https://sementedaliberdade.com.br/article/" + post.slug, link: "https://sementedaliberdade.com.br/article/" + post.slug, description: "Mais um artigo da Semente da Liberdade!", content: post.content, date: post.date, image: "https://sementedaliberdade.com.br/uploads/images/" + post.img }) }) res.set('Content-Type', 'text/xml') res.send(feed.rss2()) })
app.get("/atom", (req, res) => { res.set('Content-Type', 'text/xml') res.send(feed.atom1()); });
app.get("/json", (req, res) => { res.set('Content-Type', 'text/xml') res.send(feed.json1()); }); `
The text was updated successfully, but these errors were encountered:
I was looking for this as well and discovered that it's derived from using either feed or feedLinks.rss.
feed
feedLinks.rss
Example:
const feed = new Feed({ ... feedLinks: { rss: 'https://....' }, feed: 'https://....' })
See
feed/src/rss2.ts
Line 81 in 34dbde9
Sorry, something went wrong.
No branches or pull requests
My code
`
//feed
const feed = new Feed ({
title: "Semente Feed",
description: "O Feed RSS da Semente da Liberdade!",
id: "https://sementedaliberdade.com.br/",
link: "https:sementedaliberdade.com.br/",
language: "pt-BR",
image: "https://sementedaliberdade.com.br/images/SDL-05.png",
favicon: "https://sementedaliberdade.com.br/images/SDL-05.png",
update: new Date(),
generator: "awesome",
feedLinks: {
json: "https://sementedaliberdade.com.br/json",
atom: "https://sementedaliberdade.com.br/atom"
}
})
app.get("/feed", (req, res) => {
Post.find({approved: true}).lean().then((posts) => {
posts.forEach(post => {
feed.addItem({
title: post.title,
id: "https://sementedaliberdade.com.br/article/" + post.slug,
link: "https://sementedaliberdade.com.br/article/" + post.slug,
description: "Mais um artigo da Semente da Liberdade!",
content: post.content,
date: post.date,
image: "https://sementedaliberdade.com.br/uploads/images/" + post.img
})
})
res.set('Content-Type', 'text/xml')
res.send(feed.rss2())
})
app.get("/atom", (req, res) => {
res.set('Content-Type', 'text/xml')
res.send(feed.atom1());
});
app.get("/json", (req, res) => {
res.set('Content-Type', 'text/xml')
res.send(feed.json1());
});
`
The text was updated successfully, but these errors were encountered: