mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2024-09-28 23:07:30 +00:00
24 lines
573 B
JavaScript
24 lines
573 B
JavaScript
|
const constants = require("../constants")
|
||
|
|
||
|
function getFeedSetup(username, description, image, updated) {
|
||
|
const usedName = `@${username}`
|
||
|
return {
|
||
|
title: usedName,
|
||
|
description,
|
||
|
id: `bibliogram:user/${username}`,
|
||
|
link: `${constants.website_origin}/u/${username}`,
|
||
|
feedLinks: {
|
||
|
rss: `${constants.website_origin}/u/${username}/rss.xml`,
|
||
|
atom: `${constants.website_origin}/u/${username}/atom.xml`
|
||
|
},
|
||
|
image,
|
||
|
updated,
|
||
|
author: {
|
||
|
name: usedName,
|
||
|
link: `${constants.website_origin}/u/${username}`
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports.getFeedSetup = getFeedSetup
|