Skip to content

Commit f0f7447

Browse files
committed
Auto merge of #2074 - alsuren:fix-title, r=locks
restore crate prefixes to browser-tab titles I'm not sure when it got broken, but all of the crates.io brower tabs I have open currently say `crates.io: Rust Package Registry` when they previously said things like `mio - crates.io: Rust Package Registry` or `Search Results for 'mio' - crates.io: Rust Package Registry`. This patch fixes this. There is a bunch of code that sets the page title dynamically, but it is all being overridden by a title tag in the main app/index.html template (the DOM is only allowed to have a single title tag in it, so subsequent title tags are ignored by all browsers). There is probably a better way to do this (using fastboot to fill in the correct title on the backend would be ideal) but this patch should be enough to restore the dynamic titles for browsers with javascript enabled.
2 parents f35f853 + 3f14e8d commit f0f7447

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width, initial-scale=1">
77

8-
<title>crates.io: Rust Package Registry</title>
8+
<noscript>
9+
<title>crates.io: Rust Package Registry</title>
10+
</noscript>
911

1012
{{content-for 'head'}}
1113

0 commit comments

Comments
 (0)