This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree 2 files changed +27
-0
lines changed
2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -134,3 +134,18 @@ Get the comment service
134
134
#### ` $service .email .enabled `
135
135
136
136
Whether email (newsletter) service is enabled.
137
+
138
+ ### $service.feed
139
+
140
+ #### ` $service .feed .rss `
141
+
142
+ whether RSS feed is enabled.
143
+
144
+ #### ` $service .feed .atom `
145
+
146
+ whether Atom feed is enabled.
147
+
148
+ #### ` $service .feed .json `
149
+
150
+ whether JSON feed is enabled.
151
+
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ export function handleOptions(
194
194
const services = {
195
195
comment : { enabled : false , service : '' } ,
196
196
email : { enabled : false } ,
197
+ feed : { rss : false , atom : false , json : false } ,
197
198
} ;
198
199
199
200
if ( options . sitemap && options . sitemap . hostname ) {
@@ -246,6 +247,17 @@ export function handleOptions(
246
247
directories . forEach ( dir => {
247
248
defaultFeedOptions . posts_directories . push ( dir . dirname ) ;
248
249
} ) ;
250
+
251
+ services . feed = { rss : true , atom : true , json : true } ;
252
+ if ( options . feed . feeds ) {
253
+ if ( options . feed . feeds . rss2 && options . feed . feeds . rss2 . enable === false )
254
+ services . feed . rss = false ;
255
+ if ( options . feed . feeds . atom1 && options . feed . feeds . atom1 . enable === false )
256
+ services . feed . atom = false ;
257
+ if ( options . feed . feeds . json1 && options . feed . feeds . json1 . enable === false )
258
+ services . feed . json = false ;
259
+ }
260
+
249
261
const feedOptions = Object . assign ( { } , defaultFeedOptions , options . feed ) ;
250
262
plugins . push ( [ 'vuepress-plugin-feed' , feedOptions ] ) ;
251
263
}
You can’t perform that action at this time.
0 commit comments