mirror of
https://git.sr.ht/~cadence/bibliogram
synced 2025-12-18 03:58:49 +00:00
Redesign disabled feed system
This commit is contained in:
23
src/lib/utils/feed.js
Normal file
23
src/lib/utils/feed.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
Reference in New Issue
Block a user