-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgatsby-node.js
More file actions
39 lines (32 loc) · 1.03 KB
/
Copy pathgatsby-node.js
File metadata and controls
39 lines (32 loc) · 1.03 KB
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
32
33
34
35
36
37
38
39
'use strict';
const FilterWarningsPlugin = require('webpack-filter-warnings-plugin');
// Remove this plugin to see all the mini css warnings about conflicting order
exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
plugins: [
new FilterWarningsPlugin({
exclude: /mini-css-extract-plugin[^]*Conflicting order. Following module has been added:/,
}),
],
});
};
exports.createPages = async (args) => {
const { actions } = args;
const { createRedirect } = actions;
// Redirect sharedarticles to Reeder
createRedirect({
fromPath: '/sharedarticles',
toPath: 'https://reederapp.net/2mR0-bSCTv2wfPi1hG5Hsw',
isPermanent: true,
redirectInBrowser: true,
});
createRedirect({
fromPath: '/sharedarticles/',
toPath: 'https://reederapp.net/2mR0-bSCTv2wfPi1hG5Hsw',
isPermanent: true,
redirectInBrowser: true,
});
// Call existing createPages logic
await require('./gatsby/create-pages')(args);
};
exports.onCreateNode = require('./gatsby/on-create-node');