Skip to content

Commit 85b7757

Browse files
committed
Remove <noscript> from FastBoot-rendered pages
On FastBoot-rendered pages, <noscript> message regarding JavaScript doesn't make much sense. This commit removes the message by adding a different HTML boilerplate. https://www.ember-fastboot.com/docs/user-guide#using-a-different-index-html-file
1 parent 37bf4a6 commit 85b7757

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

config/environment.js

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = function(environment) {
2424
},
2525

2626
fastboot: {
27+
htmlFile: 'fastboot.html',
2728
hostWhitelist: ['crates.io', /^localhost:\d+$/, /\.herokuapp\.com$/],
2829
},
2930
};

public/fastboot.html

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<title>crates.io: Rust Package Registry</title>
9+
10+
<!-- EMBER_CLI_FASTBOOT_HEAD -->
11+
12+
<link rel="stylesheet" href="/assets/vendor.css">
13+
<link rel="stylesheet" href="/assets/cargo.css">
14+
15+
<link rel="manifest" href="/manifest.webmanifest">
16+
<meta name="msapplication-config" content="/browserconfig.xml">
17+
18+
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
19+
<link rel="icon" href="/cargo.png" type="image/png">
20+
<link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="Cargo">
21+
</head>
22+
<body>
23+
<!-- EMBER_CLI_FASTBOOT_BODY -->
24+
<script src="/assets/vendor.js"></script>
25+
<script src="/assets/cargo.js"></script>
26+
</body>
27+
</html>

0 commit comments

Comments
 (0)