-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.js
More file actions
31 lines (30 loc) · 976 Bytes
/
example.js
File metadata and controls
31 lines (30 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const { WebpackFeedPlugin } = require(".");
const path = require("path");
// An example of the feed plugin
new WebpackFeedPlugin({
site: "https://nin.red",
postPath: path.resolve(__dirname, "../src/posts"),
postLink: "%s/%a", // Here: %s = https://nin.red/blog, %a = Article Title
output: {
json: "feed.json",
atom: "feed.xml"
},
feedConfig: {
title: "NBlog Feed",
description: "由一条咸鱼搭建的博客",
id: "https://nin.red/blog",
link: "https://nin.red/blog",
language: "zh-cn",
favicon: "https://nin.red/static/blog-icon.png",
copyright: `Copyright (c) ${new Date().getFullYear()} NriotHrreion`,
feedLinks: {
json: "https://nin.red/feed.json",
atom: "https://nin.red/feed.xml"
},
author: {
name: "NoahHrreion",
email: "nriot233@gmail.com",
link: "https://nin.red"
}
}
});