diff --git a/eleventy.config.js b/eleventy.config.js index 19e0f45ff..ac02ecbc1 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -25,7 +25,6 @@ export default async function(eleventyConfig) { templateFormats: [ 'md', 'njk', - '11ty.js', ], }; }; diff --git a/src/data/podcast.yml b/src/data/podcast.yml deleted file mode 100644 index 78b8139cf..000000000 --- a/src/data/podcast.yml +++ /dev/null @@ -1,20 +0,0 @@ -title: Веб-стандарты -subtitle: Новости фронтенда за неделю -description: Новости фронтенда в еженедельном подкасте сообщества «[Веб-стандарты](https://web-standards.ru/)» - -url: https://web-standards.ru/podcast/ -author: Сообщество «Веб-стандарты» -type: episodic -categories: - - title: Technology - - title: News - items: - - Tech News -explicit: false -language: ru - -owner: - name: Веб-стандарты - email: wst@web-standards.ru - -copyright: СС BY-NC-ND 4.0 diff --git a/src/pages/podcast/feed.11ty.js b/src/pages/podcast/feed.11ty.js deleted file mode 100644 index c2cf4e282..000000000 --- a/src/pages/podcast/feed.11ty.js +++ /dev/null @@ -1,105 +0,0 @@ -export default { - data: { - permalink: '/podcast/feed/index.xml', - }, - - duration(time) { - // если длительность берётся из json-файла, то она задана в миллисекундах - if (typeof time === 'number') { - return Math.round(time / 1000); - } - - return time.split(':').reduceRight((acc, item, index, items) => { - return acc += parseFloat(item) * Math.pow(60, items.length - 1 - index); - }, 0); - }, - - async getEpisodes(data) { - const { episodes } = data.collections; - - const result = await Promise.all( - episodes.map(async(episode) => { - const hosts = episode.data.hosts.join(', '); - return ` - - ${episode.fileSlug}. ${episode.data.title} - ${data.podcast.url}${episode.fileSlug}/ - ${episode.date.toUTCString()} - Ведущие -

${hosts}

- ${episode.data.chapters - ? `

Темы

` - : '' - } - ${await this.htmlmin(episode.content)} - ]]>
- ${data.podcast.url}episodes/${episode.fileSlug}.mp3 - - ${episode.fileSlug} - ${this.duration(episode.data.duration)} - ${hosts} - ${data.podcast.explicit} - ${this.ruDate(episode.date)}: ${episode.data.title}. ${hosts} - -
- `; - }) - ); - - return result.join(''); - }, - - async render(data) { - return ` - - - - ${data.podcast.title} - - ${data.podcast.copyright} - ${data.podcast.language} - ${data.podcast.url} - - - - ${data.podcast.subtitle} - ${data.podcast.type} - ${data.podcast.author} - ${data.podcast.explicit} - - ${data.podcast.owner.name} - ${data.podcast.owner.email} - - - - ${data.podcast.categories - .map( - (category) => - `${ - category.items - ? category.items - .map((category) => ``) - .join('') - : '' - }` - ) - .join('')} - - ${await this.getEpisodes(data)} - - - `; - }, -};