Skip to content

A platform for community discussion. Free, open, simple.

FIX: Embroider breaking index html structure (#23811)

Jarek Radoszbd52b1ec7b7a
diff --git a/app/assets/javascripts/bootstrap-json/index.js b/app/assets/javascripts/bootstrap-json/index.js
index eac1e3fbf0a..1959ffdb315 100644
--- a/app/assets/javascripts/bootstrap-json/index.js
+++ b/app/assets/javascripts/bootstrap-json/index.js
@@ -209,10 +209,7 @@ function replaceIn(bootstrap, template, id, headers, baseURL) {
if (id === "html-tag") {
return template.replace(`<html>`, contents);
} else {
- return template.replace(
- `<bootstrap-content key="${id}"></bootstrap-content>`,
- contents
- );
+ return template.replace(`<!-- bootstrap-content ${id} -->`, contents);
}
}
diff --git a/app/assets/javascripts/discourse/app/index.html b/app/assets/javascripts/discourse/app/index.html
index d00a177c78f..892531bb483 100644
--- a/app/assets/javascripts/discourse/app/index.html
+++ b/app/assets/javascripts/discourse/app/index.html
@@ -12,15 +12,18 @@
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">
- <bootstrap-content key="before-script-load"></bootstrap-content>
+ <!-- bootstrap-content before-script-load -->
{{content-for "before-script-load"}}
- <bootstrap-content key="discourse-preload-stylesheets"></bootstrap-content>
+ <!-- bootstrap-content discourse-preload-stylesheets -->
{{content-for "discourse-preload-stylesheets"}}
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" />
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/discourse.css" />
+ <!-- bootstrap-content head -->
+ {{content-for "head"}}
+
<discourse-chunked-script entrypoint="vendor">
<script defer src="{{rootURL}}assets/vendor.js"></script>
</discourse-chunked-script>
@@ -29,33 +32,30 @@
<ember-auto-import-scripts defer entrypoint="app"></ember-auto-import-scripts>
<script defer src="{{rootURL}}assets/discourse.js"></script>
</discourse-chunked-script>
-
- <bootstrap-content key="head"></bootstrap-content>
- {{content-for "head"}}
</head>
<body>
<discourse-assets>
<discourse-assets-stylesheets>
- <bootstrap-content key="discourse-stylesheets"></bootstrap-content>
+ <!-- bootstrap-content discourse-stylesheets -->
{{content-for "discourse-stylesheets"}}
</discourse-assets-stylesheets>
<discourse-assets-json>
- <bootstrap-content key="preloaded"></bootstrap-content>
+ <!-- bootstrap-content preloaded -->
</discourse-assets-json>
<discourse-assets-icons></discourse-assets-icons>
</discourse-assets>
- <bootstrap-content key="body"></bootstrap-content>
+ <!-- bootstrap-content body -->
{{content-for "body"}}
<section id='main'>
</section>
- <bootstrap-content key="hidden-login-form"></bootstrap-content>
+ <!-- bootstrap-content hidden-login-form -->
<script defer src="{{rootURL}}assets/start-discourse.js" data-embroider-ignore></script>
- <bootstrap-content key="body-footer"></bootstrap-content>
+ <!-- bootstrap-content body-footer -->
{{content-for "body-footer"}}
</body>
</html>