File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -408,11 +408,11 @@ var Search = {
408
408
( async ( ) => {
409
409
const pagefindURL =
410
410
`${ baseURLPrefix } pagefind/pagefind.js`
411
- // adjust the `baseURLPrefix` if it is relative: the `import`
412
- // is relative to the _script URL_ here, which is in /js/.
413
- // That is different from other uses of `baseURLPrefix`, which
414
- // replace `href` and `src` attributes which are relative to the
415
- // page itself that is outside of /js/.
411
+ // adjust the `baseURLPrefix` if it is relative: the `import`
412
+ // is relative to the _script URL_ here, which is in /js/.
413
+ // That is different from other uses of `baseURLPrefix`, which
414
+ // replace `href` and `src` attributes which are relative to the
415
+ // page itself that is outside of /js/.
416
416
. replace ( / ^ \. \/ / , '../' )
417
417
Search . pagefind = await import ( pagefindURL ) ;
418
418
const options = {
Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ <h1>Redirecting…</h1>
64
64
65
65
< link href ="{{ relURL "favicon.ico " }}" rel='shortcut icon ' type ='image/x-icon '>
66
66
67
- {{ $style := resources.Get "sass/application.scss" | resources.ExecuteAsTemplate "application.scss" . | css.Sass | resources.Minify }}
68
- < link rel ="stylesheet " href ="{{ $style.RelPermalink }} ">
67
+ {{ $style := resources.Get "sass/application.scss" | resources.ExecuteAsTemplate "application.scss" . | css.Sass | resources.Minify | fingerprint }}
68
+ < link rel ="stylesheet " href ="{{ $style.RelPermalink }} "{{ if (hasPrefix .Site.BaseURL "https://") }} integrity=" {{ $style.Data.Integrity }} " {{ end }} >
69
69
<!--[if (gte IE 6)&(lte IE 8)]>
70
70
<script src="{{ relURL "js/selectivizr-min.js" }}"></script>
71
71
<![endif]-->
Original file line number Diff line number Diff line change 18
18
< script src ="{{ relURL "js /modernizr.js" }}"> </ script >
19
19
< script src ="{{ relURL "js /modernize.js" }}"> </ script >
20
20
{{ if eq (.Scratch.Get "section") "search" }}< script src ="{{ relURL "pagefind /pagefind-ui.js" }}"> </ script > {{ end }}
21
- {{ $js := resources.Get "js/application.js" | resources.ExecuteAsTemplate "js/application.js" . | resources.Minify }}
22
- < script src ="{{ $js.RelPermalink }} "> </ script >
21
+ {{ $js := resources.Get "js/application.js" | resources.ExecuteAsTemplate "js/application.js" . | resources.Minify | fingerprint }}
22
+ < script src ="{{ $js.RelPermalink }} "{{ if (hasPrefix .Site.BaseURL "https://") }} integrity=" {{ $js.Data.Integrity }} " {{ end }} > </ script >
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ test('404', async ({ page }) => {
254
254
await expect ( page . locator ( '.inner h1' ) ) . toHaveText ( `That page doesn't exist.` )
255
255
256
256
// the 404 page should be styled
257
- await expect ( page . locator ( 'link[rel="stylesheet"]' ) ) . toHaveAttribute ( 'href' , / a p p l i c a t i o n ( \. m i n ) ? \. c s s $ / )
257
+ await expect ( page . locator ( 'link[rel="stylesheet"]' ) ) . toHaveAttribute ( 'href' , / a p p l i c a t i o n ( \. m i n ) ? ( \. [ 0 - 9 a - f ] + ) ? \. c s s $ / )
258
258
259
259
// the search box is shown
260
260
await expect ( page . locator ( '#search-text' ) ) . toBeVisible ( )
You can’t perform that action at this time.
0 commit comments