在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):byteclubfr/gulp-rss开源软件地址(OpenSource Url):https://github.com/byteclubfr/gulp-rss开源编程语言(OpenSource Language):JavaScript 100.0%开源软件介绍(OpenSource Introduction):Information
Usagevar frontMatter = require('gulp-front-matter');
var rss = require('gulp-rss')
gulp.task('rss', function() {
gulp.files('./posts/*.md') // Read input files
.pipe(frontMatter()) // Extract YAML Front-Matter
.pipe(rss( // Generate RSS data
// Configuration
{
// How we deal with contextual data (typically Front-Matter)
properties: {
data: 'frontMatter', // name of property containing the data, typically extracted front-matter
// Proparty names mapping
title: 'title', // post's title (means plugin will read `file.frontMatter.title`, mandatory)
link: 'permalink', // post's URL (mandatory)
description: 'description', // post's description (optional)
author: 'author', // post's author (optional)
date: 'date', // post's publication date (mandatory, default = now)
image: 'image' // post's thumbnail (optional)
},
// Feed configuration
render: 'atom-1.0', // Feed type (atom-1.0 or rss-2.0)
title: 'My blog', // Feed title (mandatory)
description: 'My very own blog', // Feed description (optional)
link: 'http://my.bl.og', // Feed link (optional)
author: { name: 'Nicolas Chambrier' }, // Blog's author (optional)
// etc…
}
))
.pipe(gulp.dest('./public/feed.xml')) // Write output
}); See https://github.com/jpmonette/feed for the whole RSS configuration. This is the underlying module. LICENSE (BSD 2-Clause)
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论