@@ -48,51 +48,43 @@ module.exports = themeConfig => {
48
48
} ,
49
49
}
50
50
51
- const { modifyBlogPluginOptions } = themeConfig
52
-
53
- let blogPluginOptions
54
-
55
- if ( typeof modifyBlogPluginOptions === 'function' ) {
56
- blogPluginOptions = modifyBlogPluginOptions ( defaultBlogPluginOptions )
57
- } else {
58
- let resolvedFeedOptions
59
- const isFeedEnabled = themeConfig . feed && themeConfig . feed . canonical_base
60
- if ( isFeedEnabled ) {
61
- const {
62
- rss = true ,
63
- atom = false ,
64
- json = false ,
65
- ...feedOptions
66
- } = themeConfig . feed
67
- resolvedFeedOptions = Object . assign ( { } , feedOptions , {
68
- feeds : {
69
- rss2 : { enable : rss } ,
70
- atom1 : { enable : atom } ,
71
- json1 : { enable : json } ,
72
- } ,
73
- } )
74
- }
75
-
76
- const properties = [
77
- 'directories' ,
78
- 'frontmatters' ,
79
- 'globalPagination' ,
80
- 'sitemap' ,
81
- 'comment' ,
82
- 'newsletter' ,
83
- ]
84
- const themeConfigPluginOptions = {
85
- ...pick ( themeConfig , properties ) ,
86
- feed : resolvedFeedOptions ,
87
- }
51
+ let resolvedFeedOptions
52
+ const isFeedEnabled = themeConfig . feed && themeConfig . feed . canonical_base
53
+ if ( isFeedEnabled ) {
54
+ const {
55
+ rss = true ,
56
+ atom = false ,
57
+ json = false ,
58
+ ...feedOptions
59
+ } = themeConfig . feed
60
+ resolvedFeedOptions = Object . assign ( { } , feedOptions , {
61
+ feeds : {
62
+ rss2 : { enable : rss } ,
63
+ atom1 : { enable : atom } ,
64
+ json1 : { enable : json } ,
65
+ } ,
66
+ } )
67
+ }
88
68
89
- blogPluginOptions = Object . assign (
90
- { } ,
91
- defaultBlogPluginOptions ,
92
- themeConfigPluginOptions
93
- )
69
+ const properties = [
70
+ 'directories' ,
71
+ 'frontmatters' ,
72
+ 'globalPagination' ,
73
+ 'sitemap' ,
74
+ 'comment' ,
75
+ 'newsletter' ,
76
+ ]
77
+ const themeConfigPluginOptions = {
78
+ ...pick ( themeConfig , properties ) ,
79
+ feed : resolvedFeedOptions ,
94
80
}
95
81
82
+ const blogPluginOptions = Object . assign (
83
+ { } ,
84
+ defaultBlogPluginOptions ,
85
+ themeConfigPluginOptions
86
+ )
87
+
96
88
/**
97
89
* Integrate plugins
98
90
*/
0 commit comments