0.0.3 • Published 4 years ago

nuxt-yturbo v0.0.3

Weekly downloads
58
License
MIT
Repository
-
Last release
4 years ago

nuxt-yturbo

license

Setup

  • Добавьте nuxt-yturbo в качестве зависимости в ваш проект через npm
  • Добавьте nuxt-yturbo в секцию modules в файле nuxt.config.js
  • Добавьте yandexTurboFeed метод в файле nuxt.config.js
{
    modules: [
        'nuxt-yturbo',
    ]
}

Configuration

{
    yandexTurboFeed: {
        path: '/yturbo.xml',
        cacheTime: 1000 * 60 * 15,

        title: 'Title turbo feed',
        link: 'http://example.com/',
        description: 'Description turbo feed',

        async create (feed) {
            const articles = await getArticles();

            articles.forEach(article => {
                feed.item({
                    enable: 'false',
                    id: article.id,

                    title: article.title,
                    link: `http://example.com/articles/${article.slug}/`,
                    description: article.description,
                    date: new Date(article.datetime_publications),
                    content: article.content
                })
            });
        }
    },
}

Links

https://github.com/VlaDi4eKK/yandex-turbo-feed-module

https://github.com/LightAir/turbo-rss

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago