@@ -87,29 +87,29 @@ public static void generate(Path basedir, boolean publish, boolean v1, boolean d
8787 pb .step ();
8888
8989 if (doAscii ) {
90- Asciidoctor asciidoctor = Asciidoctor .Factory .create ();
91-
92- asciidoctor . convertFile (
93- asciidoc .resolve ("index.adoc" ). toFile (),
94- createOptions ( asciidoc , outdir , version , null , asciidoc .resolve ("index.adoc" )) );
95- var index = outdir . resolve ( " index.html" );
96- Files . writeString ( index , hljs ( Files . readString ( index )) );
97- pb . step ();
98-
99- Stream . of ( treeDirs )
100- . forEach (
101- throwingConsumer (
102- name -> {
103- Path modules = outdir . resolve ( name );
104- Files .createDirectories ( modules );
105- Files . walk ( asciidoc . resolve ( name ) )
106- . filter ( Files :: isRegularFile )
107- . forEach (
108- module -> {
109- processModule ( asciidoctor , asciidoc , module , outdir , name , version );
110- pb . step ( );
111- } );
112- }));
90+ try ( var asciidoctor = Asciidoctor .Factory .create ()) {
91+ asciidoctor . convertFile (
92+ asciidoc . resolve ( "index.adoc" ). toFile (),
93+ createOptions ( asciidoc , outdir , version , null , asciidoc .resolve ("index.adoc" )));
94+ var index = outdir .resolve ("index.html" );
95+ Files . writeString ( index , hljs ( Files . readString ( index )) );
96+ pb . step ( );
97+
98+ Stream . of ( treeDirs )
99+ . forEach (
100+ throwingConsumer (
101+ name -> {
102+ Path modules = outdir . resolve ( name );
103+ Files . createDirectories ( modules );
104+ Files .walk ( asciidoc . resolve ( name ))
105+ . filter ( Files :: isRegularFile )
106+ . forEach (
107+ module -> {
108+ processModule ( asciidoctor , asciidoc , module , outdir , name , version );
109+ pb . step ( );
110+ } );
111+ }) );
112+ }
113113 }
114114
115115 // LICENSE
@@ -242,6 +242,7 @@ private static Options createOptions(Path basedir, Path outdir, String version,
242242 var attributes = Attributes .builder ();
243243
244244 attributes .attribute ("docfile" , docfile .toString ());
245+ attributes .attribute ("stylesheet" , "js/styles/site.css" );
245246 attributes .attribute ("love" , "♡" );
246247 attributes .attribute ("docinfo" , "shared" );
247248 attributes .title (title == null ? "jooby: do more! more easily!!" : "jooby: " + title );
@@ -280,7 +281,7 @@ private static Options createOptions(Path basedir, Path outdir, String version,
280281 attributes .attribute ("date" , DateTimeFormatter .ISO_INSTANT .format (Instant .now ()));
281282
282283 OptionsBuilder options = Options .builder ();
283- options .backend ("html " );
284+ options .backend ("html5 " );
284285
285286 options .attributes (attributes .build ());
286287 options .baseDir (basedir .toAbsolutePath ().toFile ());
0 commit comments