Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Добавляет репозиторий подкаста как источник данных #360

Merged

Conversation

monochromer
Copy link
Collaborator

@monochromer monochromer commented Apr 24, 2024

  • добавляет репозиторий подкаста как зависимость, чтобы страницы можно было генерировать на основе md-файлов из репозитория, а не из xml-файла с сервера
  • переносит генерацию RSS-ленты подкаста в репозиторий сайта
  • переносит генерацию id заголовков в контенте из плагина к markdown-it в трансформации Eleventy

Для работы нужны данные о размерах файлов из этого PR.
Для тестов вычисление размера файла можно сделать в виде заглушки, например в файле src/eleventy-config/collections.js:

Object.assign(templateData, {
    permalink: false,
    layout: false,
    tags: ['episodes'],
    eleventyComputed: {
        episode(data) {
            return data?.page?.fileSlug;
        },
        fileSize() {
            // вот здесь
            return 99999;
        },
        audio(data) {
            return `https://web-standards.ru/podcast/episodes/${data.episode}.mp3`;
        },
    },
});

@monochromer monochromer marked this pull request as draft April 24, 2024 17:59
Copy link
Member

@pepelsbey pepelsbey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Заметил, что файл podcastMeta.yml называется кэмел-кейсом, это во всём проекте впервые, кажется. Учитывая, что рядом уже есть site.js, может сделаем его podcast.yml? Я потом уже сделаю рефакторинг и может быть смёржу их или выделю третий общий.

@monochromer
Copy link
Collaborator Author

может сделаем его podcast.yml?

поменял

@pepelsbey pepelsbey merged commit 1642a5c into web-standards-ru:main May 6, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants