Commit add65e1 1 parent 695a635 commit add65e1 Copy full SHA for add65e1
File tree 3 files changed +42
-9
lines changed
3 files changed +42
-9
lines changed Original file line number Diff line number Diff line change 17
17
<!-- Turn on to speed up processing for development/writing -->
18
18
<add key =" SuppressSpeakers" value =" false" />
19
19
<add key =" SuppressProjects" value =" false" />
20
+ <add key =" SuppressSpeakerBlogs" value =" false" />
21
+ <add key =" SuppressSpeakerGeoLocation" value =" false" />
22
+ <add key =" SuppressSpeakerImages" value =" false" />
20
23
</appSettings >
21
24
</configuration >
Original file line number Diff line number Diff line change @@ -41,5 +41,13 @@ public static class AppSettings
41
41
public static bool SuppressProjects { get ; set ; }
42
42
= string . Equals ( ConfigurationManager . AppSettings [ "SuppressProjects" ] , "true" , StringComparison . OrdinalIgnoreCase ) ;
43
43
44
+ public static bool SuppressSpeakerBlogs { get ; set ; }
45
+ = string . Equals ( ConfigurationManager . AppSettings [ "SuppressSpeakerBlogs" ] , "true" , StringComparison . OrdinalIgnoreCase ) ;
46
+
47
+ public static bool SuppressSpeakerGeoLocation { get ; set ; }
48
+ = string . Equals ( ConfigurationManager . AppSettings [ "SuppressSpeakerGeoLocation" ] , "true" , StringComparison . OrdinalIgnoreCase ) ;
49
+
50
+ public static bool SuppressSpeakerImages { get ; set ; }
51
+ = string . Equals ( ConfigurationManager . AppSettings [ "SuppressSpeakerImages" ] , "true" , StringComparison . OrdinalIgnoreCase ) ;
44
52
}
45
53
}
Original file line number Diff line number Diff line change @@ -53,17 +53,39 @@ public static async Task<int> Main(string[] args)
53
53
54
54
private static Bootstrapper AddSpeakersPipeline ( Bootstrapper bootstrapper )
55
55
{
56
+ var sources = new ExecuteSources ( "community/speakers/*.md" ) ;
57
+
58
+ if ( ! AppSettings . SuppressSpeakerGeoLocation )
59
+ {
60
+ sources . Add ( new GeocodeLocations ( Config . FromSetting ( SiteKeys . AzureMapsSubscriptionKey ) ) ) ;
61
+ }
62
+ else
63
+ {
64
+ Console . WriteLine ( "Suppressing Geolocation extraction ****SHOULD ONLY BE IN DEBUG***" ) ;
65
+ }
66
+
67
+ if ( ! AppSettings . SuppressSpeakerBlogs )
68
+ {
69
+ sources . Add ( new GetBlogFeeds ( ) ) ;
70
+ }
71
+ else
72
+ {
73
+ Console . WriteLine ( "Suppressing Speaker Blog Entry retrieval ****SHOULD ONLY BE IN DEBUG***" ) ;
74
+ }
75
+
76
+ if ( ! AppSettings . SuppressSpeakerImages )
77
+ {
78
+ sources . Add ( new SpeakerImage ( ) ) ;
79
+ }
80
+ else
81
+ {
82
+ Console . WriteLine ( "Suppressing Speaker Images retrieval ****SHOULD ONLY BE IN DEBUG***" ) ;
83
+ }
84
+
56
85
bootstrapper = bootstrapper . ModifyPipeline (
57
86
nameof ( Statiq . Web . Pipelines . Content ) ,
58
- x => x . ProcessModules . Add (
59
- // Modules for speakers
60
- new ExecuteSources ( "community/speakers/*.md" )
61
- {
62
- new GeocodeLocations ( Config . FromSetting ( SiteKeys . AzureMapsSubscriptionKey ) ) ,
63
- new GetBlogFeeds ( ) ,
64
- new SpeakerImage ( )
65
- }
66
- ) ) ;
87
+ x => x . ProcessModules . Add ( sources ) ) ;
88
+
67
89
return bootstrapper ;
68
90
}
69
91
You can’t perform that action at this time.
0 commit comments