Skip to content

Commit

Permalink
Merge pull request #367 from valtlai/no-script-type
Browse files Browse the repository at this point in the history
Delete <script type> attribute
  • Loading branch information
bglw authored Jul 27, 2023
2 parents 281ffbb + 05662ed commit a3083dd
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pagefind provides a prebuilt search UI out of the box. Add the following snippet

```html
<link href="/_pagefind/pagefind-ui.css" rel="stylesheet">
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>
<div id="search"></div>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pagefind UI can be added to any page with the following snippet. The `/_pagefind

```html
<link href="/_pagefind/pagefind-ui.css" rel="stylesheet">
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>

<div id="search"></div>
<script>
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{{ partial "banner.html" }}
{{ partial "nav.html" }}
<div class="search">
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>
<div id="search"></div>
</div>
<div class="column">
Expand All @@ -66,6 +66,6 @@ <h1>{{ .Params.title }}</h1>
</script>

{{ $js := resources.Get "js/site.js" | js.Build }}
<script type="text/javascript" src="{{ $js.RelPermalink }}" defer></script>
<script src="{{ $js.RelPermalink }}" defer></script>
</body>
</html>
2 changes: 1 addition & 1 deletion pagefind/features/modular_ui/modular_ui_base.feature
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Feature: Base Modular UI Tests
<div id="search"></div>
<div id="summary"></div>
<div id="results"></div>
<script src="/_pagefind/pagefind-modular-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-modular-ui.js"></script>
<script>
window.pagefind = new PagefindModularUI.Instance();
Expand Down
4 changes: 2 additions & 2 deletions pagefind/features/multisite/multisite_base.feature
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Feature: Multisite Search
Given I have a "root/index.html" file with the body:
"""
<div id="search"></div>
<script src="/website_a/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/website_a/_pagefind/pagefind-ui.js"></script>
"""
When I run my program with the flags:
| --source root/website_a |
Expand Down Expand Up @@ -107,7 +107,7 @@ Feature: Multisite Search
Given I have a "root/index.html" file with the body:
"""
<div id="search"></div>
<script src="/website_a/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/website_a/_pagefind/pagefind-ui.js"></script>
"""
When I run my program with the flags:
| --source root/website_a |
Expand Down
2 changes: 1 addition & 1 deletion pagefind/features/ui/ui_base.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Feature: Base UI Tests
Given I have a "public/index.html" file with the body:
"""
<div id="search"></div>
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>
<script>
window.pui = new PagefindUI({ element: "#search" });
Expand Down
4 changes: 2 additions & 2 deletions pagefind/features/ui/ui_hooks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Feature: UI Hooks
"""
<h1>Search</h1>
<div id="search"></div>
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>
<script>
window.pui = new PagefindUI({
Expand Down Expand Up @@ -43,7 +43,7 @@ Feature: UI Hooks
<h1>Search</h1>
<img src="my.png" />
<div id="search"></div>
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>
<script>
window.pui = new PagefindUI({
Expand Down
4 changes: 2 additions & 2 deletions pagefind/features/ui/ui_strings.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Feature: UI Test Strings
<body>
<h1>Search</h1>
<div id="search"></div>
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>
<script>
window.pui = new PagefindUI({ element: "#search" });
Expand Down Expand Up @@ -44,7 +44,7 @@ Feature: UI Test Strings
<body>
<h1>Search</h1>
<div id="search"></div>
<script src="/_pagefind/pagefind-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-ui.js"></script>
<script>
window.pui = new PagefindUI({
Expand Down
2 changes: 1 addition & 1 deletion pagefind_ui/default/_dev_files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<h1>Hello World from the local dev suite</h1>
<p>Searches for words ending in <kbd>y</kbd> will return no results</p>
<div id="search"></div>
<script src="/_pagefind/ui.js" type="application/javascript"></script>
<script src="/_pagefind/ui.js"></script>
<script>
new PagefindUI({ element: "#search" });
</script>
Expand Down
2 changes: 1 addition & 1 deletion pagefind_ui/modular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Pagefind CLI outputs assets for the Modular UI that can be loaded directly:

```html
<link href="/_pagefind/pagefind-modular-ui.css" rel="stylesheet">
<script src="/_pagefind/pagefind-modular-ui.js" type="text/javascript"></script>
<script src="/_pagefind/pagefind-modular-ui.js"></script>

<script>
window.addEventListener('DOMContentLoaded', (event) => {
Expand Down
2 changes: 1 addition & 1 deletion pagefind_ui/modular/_dev_files/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h1>Hello World from the modular dev suite</h1>
</pre>
<h2>Later on, we have some results:</h2>
<div id="resultlist"></div>
<script src="/_pagefind/modular.js" type="application/javascript"></script>
<script src="/_pagefind/modular.js"></script>
<script>
const pagefind = new PagefindModularUI.Instance();
pagefind.add(new PagefindModularUI.Input({
Expand Down

0 comments on commit a3083dd

Please sign in to comment.