DEV: Make index.html a valid html (#23289)
Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
This commit is contained in:
parent
33d5845991
commit
6f1d666323
|
@ -206,7 +206,14 @@ function replaceIn(bootstrap, template, id, headers, baseURL) {
|
|||
BUILDERS[id](buffer, bootstrap, headers, baseURL);
|
||||
let contents = buffer.filter((b) => b && b.length > 0).join("\n");
|
||||
|
||||
return template.replace(`<bootstrap-content key="${id}">`, contents);
|
||||
if (id === "html-tag") {
|
||||
return template.replace(`<html>`, contents);
|
||||
} else {
|
||||
return template.replace(
|
||||
`<bootstrap-content key="${id}"></bootstrap-content>`,
|
||||
contents
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function extractPreloadJson(html) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<bootstrap-content key="html-tag">
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
👋 Greetings Discourse Developer. This HTML was generated by the ember-cli proxy. If you're looking for
|
||||
|
@ -13,10 +12,10 @@
|
|||
<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 key="before-script-load"></bootstrap-content>
|
||||
{{content-for "before-script-load"}}
|
||||
|
||||
<bootstrap-content key="discourse-preload-stylesheets">
|
||||
<bootstrap-content key="discourse-preload-stylesheets"></bootstrap-content>
|
||||
{{content-for "discourse-preload-stylesheets"}}
|
||||
|
||||
<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" />
|
||||
|
@ -27,32 +26,32 @@
|
|||
|
||||
<ember-auto-import-scripts defer entrypoint="app"></ember-auto-import-scripts>
|
||||
|
||||
<bootstrap-content key="head">
|
||||
<bootstrap-content key="head"></bootstrap-content>
|
||||
{{content-for "head"}}
|
||||
</head>
|
||||
<body>
|
||||
<discourse-assets>
|
||||
<discourse-assets-stylesheets>
|
||||
<bootstrap-content key="discourse-stylesheets">
|
||||
<bootstrap-content key="discourse-stylesheets"></bootstrap-content>
|
||||
{{content-for "discourse-stylesheets"}}
|
||||
</discourse-assets-stylesheets>
|
||||
<discourse-assets-json>
|
||||
<bootstrap-content key="preloaded">
|
||||
<bootstrap-content key="preloaded"></bootstrap-content>
|
||||
</discourse-assets-json>
|
||||
<discourse-assets-icons></discourse-assets-icons>
|
||||
</discourse-assets>
|
||||
|
||||
<bootstrap-content key="body">
|
||||
<bootstrap-content key="body"></bootstrap-content>
|
||||
{{content-for "body"}}
|
||||
|
||||
<section id='main'>
|
||||
</section>
|
||||
|
||||
<bootstrap-content key="hidden-login-form">
|
||||
<bootstrap-content key="hidden-login-form"></bootstrap-content>
|
||||
|
||||
<script defer src="{{rootURL}}assets/start-discourse.js"></script>
|
||||
|
||||
<bootstrap-content key="body-footer">
|
||||
<bootstrap-content key="body-footer"></bootstrap-content>
|
||||
{{content-for "body-footer"}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue