Skip to content

Commit 60b7380

Browse files
ia3andygsmet
authored andcommitted
Fix index.html for compat before 3.9 and dynamic index
(cherry picked from commit 0c265bc)
1 parent f8a7112 commit 60b7380

File tree

2 files changed

+300
-1
lines changed

2 files changed

+300
-1
lines changed

independent-projects/tools/base-codestarts/src/main/resources/codestarts/quarkus/project/quarkus/base/src/main/resources/META-INF/resources/index.tpl.qute.html

Lines changed: 288 additions & 0 deletions
Large diffs are not rendered by default.

independent-projects/tools/codestarts/src/main/java/io/quarkus/devtools/codestarts/core/strategy/ContentMergeCodestartFileStrategyHandler.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
import io.quarkus.devtools.codestarts.CodestartStructureException;
1010
import io.quarkus.devtools.codestarts.core.reader.TargetFile;
1111

12+
/**
13+
*
14+
* @deprecated this was a quick-n-dirty way to allow extensions to provide content to the index.html,
15+
* we don't need it anymore with the dynamic index.html. If we need something similar in the future let's find a
16+
* more elegant way.
17+
*/
18+
@Deprecated
1219
final class ContentMergeCodestartFileStrategyHandler implements CodestartFileStrategyHandler {
1320

1421
static final String NAME = "content-merge";
@@ -40,6 +47,10 @@ public void process(Path targetDirectory, String relativePath, List<TargetFile>
4047
return;
4148
}
4249
createDirectories(targetPath);
43-
writeFile(targetPath, template.get().getContent().replace("{merged-content}", mergedContent.toString()));
50+
final String content = template.get().getContent();
51+
if (content.isBlank()) {
52+
return;
53+
}
54+
writeFile(targetPath, content.replace("{merged-content}", mergedContent.toString()));
4455
}
4556
}

0 commit comments

Comments
 (0)