mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-09 23:27:28 +02:00
refactor(v2): remove type attribute from link and script tags (#4907)
* refactor(v2): remove type attribute from link and script tags * minor TS fix * stylesheets.type => optional Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
d81d43c247
commit
55e9bd8ac9
7 changed files with 11 additions and 18 deletions
|
@ -406,7 +406,7 @@ module.exports = {
|
|||
<%~ metaAttribute %>
|
||||
<% }); %>
|
||||
<% it.stylesheets.forEach((stylesheet) => { %>
|
||||
<link rel="stylesheet" type="text/css" href="<%= it.baseUrl %><%= stylesheet %>" />
|
||||
<link rel="stylesheet" href="<%= it.baseUrl %><%= stylesheet %>" />
|
||||
<% }); %>
|
||||
<% it.scripts.forEach((script) => { %>
|
||||
<link rel="preload" href="<%= it.baseUrl %><%= script %>" as="script">
|
||||
|
@ -421,7 +421,7 @@ module.exports = {
|
|||
<span>Custom markup</span>
|
||||
</div>
|
||||
<% it.scripts.forEach((script) => { %>
|
||||
<script type="text/javascript" src="<%= it.baseUrl %><%= script %>"></script>
|
||||
<script src="<%= it.baseUrl %><%= script %>"></script>
|
||||
<% }); %>
|
||||
<%~ it.postBodyTags %>
|
||||
</body>
|
||||
|
@ -445,7 +445,6 @@ module.exports = {
|
|||
// Object format.
|
||||
{
|
||||
href: 'http://mydomain.com/style.css',
|
||||
type: 'text/css',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue