Add description to feed
This commit is contained in:
parent
74d4813831
commit
cfa9a05bd2
|
|
@ -4,11 +4,12 @@ import { HandlerContext } from "$fresh/server.ts";
|
||||||
import { serialize, tag, declaration } from "https://deno.land/x/serializexml@v0.3.2/mod.ts";
|
import { serialize, tag, declaration } from "https://deno.land/x/serializexml@v0.3.2/mod.ts";
|
||||||
|
|
||||||
function toItemTag(episode: Episode) {
|
function toItemTag(episode: Episode) {
|
||||||
|
console.log(episode.squareImage.at(-1).url)
|
||||||
return tag("item", [
|
return tag("item", [
|
||||||
tag("title", episode.titles.title),
|
tag("title", episode.titles.title),
|
||||||
tag("link", episode.url),
|
tag("link", episode.url),
|
||||||
tag("description", episode.titles.description),
|
tag("description", episode.titles.subtitle),
|
||||||
tag("itunes:summary", episode.titles.description),
|
tag("itunes:summary", episode.titles.subtitle),
|
||||||
tag("guid", episode.id, [["isPermaLink", "false"]]),
|
tag("guid", episode.id, [["isPermaLink", "false"]]),
|
||||||
tag("pubDate", episode.date),
|
tag("pubDate", episode.date),
|
||||||
tag("enclosure", "", [
|
tag("enclosure", "", [
|
||||||
|
|
@ -22,7 +23,6 @@ function toItemTag(episode: Episode) {
|
||||||
async function buildFeed(seriesId: any) {
|
async function buildFeed(seriesId: any) {
|
||||||
const serie = await nrkRadio.getSerieData(seriesId)
|
const serie = await nrkRadio.getSerieData(seriesId)
|
||||||
|
|
||||||
|
|
||||||
// Quickly adapted from https://raw.githubusercontent.com/olaven/paperpod/1cde9abd3174b26e126aa74fc5a3b63fd078c0fd/packages/converter/src/rss.ts
|
// Quickly adapted from https://raw.githubusercontent.com/olaven/paperpod/1cde9abd3174b26e126aa74fc5a3b63fd078c0fd/packages/converter/src/rss.ts
|
||||||
return serialize(
|
return serialize(
|
||||||
declaration([
|
declaration([
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue