modified: .env

modified:   src/app/head.tsx
	modified:   "src/\321\201omponents/podcasts/getRssXml.ts"
master
joker 2 years ago
parent b43f9e0692
commit 975fac7e2c
  1. 4
      .env
  2. 2
      src/app/head.tsx
  3. 12
      src/сomponents/podcasts/getRssXml.ts

@ -1,2 +1,6 @@
// .env.local // .env.local
USER_="crapshr6_bb"
HOST="crapshr6.beget.tech"
DATABASE="crapshr6_bb"
PASSWORD="Lo*&9pKQ"

@ -7,7 +7,7 @@ export default function Head() {
<link rel="icon" href="/favicon.png" /> <link rel="icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width initial-scale=1.0"/> <meta name="viewport" content="width=device-width initial-scale=1.0"/>
<meta content="IE=edge" http-equiv="X-UA-Compatible"/> <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
<meta name="description" content="Рассказываем истории и говорим об интересном ~~~~~ Если вам нужен подкаст или консультация, пишите на crapsh@gmail.com"/> <meta name="description" content="Рассказываем истории и говорим об интересном - Если вам нужен подкаст или консультация, пишите на crapsh@gmail.com"/>
<meta name="keywords" content="Подкасты, истории, разговор, радио, подкастинг"/> <meta name="keywords" content="Подкасты, истории, разговор, радио, подкастинг"/>
<meta name="format-detection" content="telephone=no"/> <meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="address=no"/> <meta name="format-detection" content="address=no"/>

@ -10,13 +10,23 @@ interface Props {
lastBuildDate: string lastBuildDate: string
} }
const newRess = (title: string) => {
switch(title) {
case "Нравится слушать": return '<itunes:new-feed-url>https://blogbaster.xyz/api/podcasts/like-to-listen/rss</itunes:new-feed-url>';
case "Поуехали": return '<itunes:new-feed-url>https://blogbaster.xyz/api/podcasts/lets-go/rss</itunes:new-feed-url>';
case "Хобби и ты": return '<itunes:new-feed-url>https://blogbaster.xyz/api/podcasts/hobbits/rss</itunes:new-feed-url>';
}
}
export const getRssXml = (data: Props) => { export const getRssXml = (data: Props) => {
let item =`<?xml version="1.0" encoding="UTF-8"?> let item =`<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" <rss xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" > xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" >
<channel> <channel>
`+ newRess(data.title)
+`
<title><![CDATA[`+data.title+`]]></title> <title><![CDATA[`+data.title+`]]></title>
<description><![CDATA[`+data.description+`]]></description> <description><![CDATA[`+data.description+`]]></description>
<link>`+data.atom_link+`</link> <link>`+data.atom_link+`</link>

Loading…
Cancel
Save