@@ -36,6 +36,7 @@ public Guides(File tmpDir, File guidesDir, AsciiDoctor asciiDoctor) throws IOExc
36
36
loadGuides (asciiDoctor , new File (f , "generated-guides/operator" ), GuideCategory .OPERATOR );
37
37
loadGuides (asciiDoctor , new File (f , "generated-guides/migration" ), GuideCategory .MIGRATION );
38
38
loadGuides (asciiDoctor , new File (f , "generated-guides/getting-started" ), GuideCategory .GETTING_STARTED );
39
+ loadGuides (asciiDoctor , new File (f , "generated-guides/high-availability" ), GuideCategory .HIGH_AVAILABILITY );
39
40
} catch (IOException e ) {
40
41
e .printStackTrace ();
41
42
}
@@ -75,8 +76,12 @@ private void loadGuides(AsciiDoctor asciiDoctor, File d, GuideCategory category)
75
76
Map <String , Object > attributes = asciiDoctor .parseAttributes (f , sharedAttributes );
76
77
77
78
boolean community = "true" .equals (attributes .get ("community" ));
79
+
80
+ Object isTileVisibileAttribute = attributes .get ("guide-tile-visible" );
81
+ boolean isTileVisibile = isTileVisibileAttribute == null || "true" .equals (isTileVisibileAttribute );
78
82
try {
79
- Guide g = new Guide (category , f , (String ) attributes .get ("guide-title" ), (String ) attributes .get ("guide-summary" ), (String ) attributes .get ("guide-tags" ), (String ) attributes .get ("author" ), community , (String ) attributes .get ("external-link" ));
83
+ Guide g = new Guide (category , f , (String ) attributes .get ("guide-title" ), (String ) attributes .get ("guide-summary" ), (String ) attributes .get ("guide-tags" ), (String ) attributes .get ("author" ), community ,
84
+ (String ) attributes .get ("external-link" ), isTileVisibile );
80
85
81
86
if (guidePriorities != null ) {
82
87
Integer priority = guidePriorities .get (g .getName ());
@@ -147,8 +152,9 @@ public class Guide {
147
152
private List <String > tags ;
148
153
private int priority = Integer .MAX_VALUE ;
149
154
private String externalLink ;
155
+ private boolean tileVisible ;
150
156
151
- public Guide (GuideCategory category , File source , String title , String summary , String tags , String author , boolean community , String externalLink ) {
157
+ public Guide (GuideCategory category , File source , String title , String summary , String tags , String author , boolean community , String externalLink , boolean tileVisible ) {
152
158
this .category = category ;
153
159
this .name = source .getName ().replace (".adoc" , "" );
154
160
this .author = author ;
@@ -162,6 +168,7 @@ public Guide(GuideCategory category, File source, String title, String summary,
162
168
}
163
169
this .path = category .getId () + "/" + name ;
164
170
this .externalLink = externalLink ;
171
+ this .tileVisible = tileVisible ;
165
172
}
166
173
167
174
public String getName () {
@@ -215,6 +222,10 @@ public String getExternalLink() {
215
222
public boolean isExternal () {
216
223
return externalLink != null ;
217
224
}
225
+
226
+ public boolean isTileVisible () {
227
+ return tileVisible ;
228
+ }
218
229
}
219
230
220
231
public enum GuideCategory {
@@ -223,7 +234,8 @@ public enum GuideCategory {
223
234
GETTING_STARTED ("getting-started" , "Getting started" ),
224
235
SERVER ("server" , "Server" ),
225
236
OPERATOR ("operator" , "Operator" ),
226
- SECURING_APPS ("securing-apps" , "Securing applications" );
237
+ SECURING_APPS ("securing-apps" , "Securing applications" ),
238
+ HIGH_AVAILABILITY ("high-availability" , "High availability" );
227
239
228
240
private String label ;
229
241
0 commit comments