1
0
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:
Cadence Ember
2020-04-22 23:59:45 +12:00
parent 8300744d87
commit b7d3309a2b
9 changed files with 210 additions and 89 deletions

23
src/lib/utils/feed.js Normal file
View 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