astro-accelerator 7.1.34 → 7.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.1.34",
2
+ "version": "7.1.36",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -35,11 +35,11 @@
35
35
  "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
36
36
  },
37
37
  "dependencies": {
38
- "@astrojs/markdown-remark": "^7.3.3",
39
- "@astrojs/mdx": "^8.1.0",
38
+ "@astrojs/markdown-remark": "^7.3.4",
39
+ "@astrojs/mdx": "^8.1.1",
40
40
  "@img/sharp-linux-x64": "^0.35.5",
41
- "astro": "^7.4.0",
42
- "astro-accelerator-utils": "^0.3.114",
41
+ "astro": "^7.4.2",
42
+ "astro-accelerator-utils": "^0.3.116",
43
43
  "csv": "^6.6.4",
44
44
  "hast-util-from-selector": "^3.0.1",
45
45
  "html-to-text": "^10.0.1",
@@ -42,6 +42,7 @@ summary {
42
42
  color: var(--fore-link);
43
43
  cursor: pointer;
44
44
  text-decoration: underline;
45
+ text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
45
46
 
46
47
  @media (prefers-reduced-motion: no-preference) {
47
48
  transition: all 200ms ease-in-out;
@@ -335,36 +336,6 @@ table {
335
336
  }
336
337
  }
337
338
 
338
- /* Breadcrumbs */
339
-
340
- .site-breadcrumbs {
341
- & ol {
342
- font-size: 0.8rem;
343
- padding: 0.1em 1em;
344
- text-align: center;
345
- }
346
-
347
- & li {
348
- display: inline;
349
- padding: 0.2em;
350
-
351
- &::before {
352
- content: '>';
353
- margin-inline-end: 0.3rem;
354
- }
355
-
356
- &:first-child::before {
357
- content: '';
358
- margin-inline-end: 0;
359
- }
360
- }
361
-
362
- & a[aria-current] {
363
- color: var(--fore);
364
- text-decoration: none;
365
- }
366
- }
367
-
368
339
  /* Navigation */
369
340
 
370
341
  .overlay-menu {
@@ -447,71 +418,7 @@ table {
447
418
  }
448
419
  }
449
420
 
450
- /* Table of Contents (TOC) */
451
-
452
- .page-toc {
453
- font-size: var(--font-size-meta);
454
- margin: 0 0 var(--paragraph-margin) 0;
455
-
456
- & ol {
457
- list-style: none;
458
- }
459
-
460
- & li {
461
- & a {
462
- display: block;
463
- padding: 0.5rem 1rem;
464
- }
465
-
466
- &.toc-lev-2 {
467
- margin-left: 0rem;
468
- }
469
-
470
- &.toc-lev-3 a {
471
- margin-left: 1rem;
472
- }
473
-
474
- &.toc-lev-4 a {
475
- margin-left: 2rem;
476
- }
477
-
478
- &.toc-lev-5 a {
479
- margin-left: 3rem;
480
- }
481
-
482
- &.toc-lev-6 a {
483
- margin-left: 4rem;
484
- }
485
- }
486
- }
487
-
488
- /* Footer */
489
-
490
- .site-footer {
491
- background-color: var(--aft-block);
492
- margin-top: 4rem;
493
- padding: 0.5rem 0;
494
- text-align: center;
495
- width: 100%;
496
-
497
- & h2 {
498
- padding-top: 2rem;
499
- }
500
-
501
- & a {
502
- color: var(--fore-link);
503
- display: block;
504
- padding: 0.5rem 1rem;
505
- text-decoration: none;
506
-
507
- &:hover,
508
- &:focus {
509
- color: var(--fore-link-alt);
510
- }
511
- }
512
- }
513
-
514
- /* Overlay (Mobile Navigation, Search) */
421
+ /* Overlay (Mobile Navigation) */
515
422
 
516
423
  .overlay {
517
424
  background-color: var(--aft);
@@ -530,8 +437,6 @@ table {
530
437
  margin: 0 auto;
531
438
  }
532
439
 
533
- /* Site Search */
534
-
535
440
  /* Articles */
536
441
 
537
442
  .post-list {
@@ -694,6 +599,8 @@ table {
694
599
  padding-left: 0.6rem;
695
600
  }
696
601
 
602
+ /* Post meta */
603
+
697
604
  .post-meta {
698
605
  &:not(.mini) {
699
606
  border-top: 1px solid var(--icon-block);
@@ -827,8 +734,6 @@ table {
827
734
  }
828
735
  }
829
736
 
830
- /* Taxonomy */
831
-
832
737
  /* Video */
833
738
 
834
739
  .yt-video {
@@ -42,6 +42,7 @@ summary {
42
42
  color: var(--fore-link);
43
43
  cursor: pointer;
44
44
  text-decoration: underline;
45
+ text-decoration-color: color-mix(in srgb, currentColor 30%, transparent);
45
46
 
46
47
  @media (prefers-reduced-motion: no-preference) {
47
48
  transition: all 200ms ease-in-out;
@@ -335,36 +336,6 @@ table {
335
336
  }
336
337
  }
337
338
 
338
- /* Breadcrumbs */
339
-
340
- .site-breadcrumbs {
341
- & ol {
342
- font-size: 0.8rem;
343
- padding: 0.1em 1em;
344
- text-align: center;
345
- }
346
-
347
- & li {
348
- display: inline;
349
- padding: 0.2em;
350
-
351
- &::before {
352
- content: '>';
353
- margin-inline-end: 0.3rem;
354
- }
355
-
356
- &:first-child::before {
357
- content: '';
358
- margin-inline-end: 0;
359
- }
360
- }
361
-
362
- & a[aria-current] {
363
- color: var(--fore);
364
- text-decoration: none;
365
- }
366
- }
367
-
368
339
  /* Navigation */
369
340
 
370
341
  .overlay-menu {
@@ -447,71 +418,7 @@ table {
447
418
  }
448
419
  }
449
420
 
450
- /* Table of Contents (TOC) */
451
-
452
- .page-toc {
453
- font-size: var(--font-size-meta);
454
- margin: 0 0 var(--paragraph-margin) 0;
455
-
456
- & ol {
457
- list-style: none;
458
- }
459
-
460
- & li {
461
- & a {
462
- display: block;
463
- padding: 0.5rem 1rem;
464
- }
465
-
466
- &.toc-lev-2 {
467
- margin-left: 0rem;
468
- }
469
-
470
- &.toc-lev-3 a {
471
- margin-left: 1rem;
472
- }
473
-
474
- &.toc-lev-4 a {
475
- margin-left: 2rem;
476
- }
477
-
478
- &.toc-lev-5 a {
479
- margin-left: 3rem;
480
- }
481
-
482
- &.toc-lev-6 a {
483
- margin-left: 4rem;
484
- }
485
- }
486
- }
487
-
488
- /* Footer */
489
-
490
- .site-footer {
491
- background-color: var(--aft-block);
492
- margin-top: 4rem;
493
- padding: 0.5rem 0;
494
- text-align: center;
495
- width: 100%;
496
-
497
- & h2 {
498
- padding-top: 2rem;
499
- }
500
-
501
- & a {
502
- color: var(--fore-link);
503
- display: block;
504
- padding: 0.5rem 1rem;
505
- text-decoration: none;
506
-
507
- &:hover,
508
- &:focus {
509
- color: var(--fore-link-alt);
510
- }
511
- }
512
- }
513
-
514
- /* Overlay (Mobile Navigation, Search) */
421
+ /* Overlay (Mobile Navigation) */
515
422
 
516
423
  .overlay {
517
424
  background-color: var(--aft);
@@ -530,8 +437,6 @@ table {
530
437
  margin: 0 auto;
531
438
  }
532
439
 
533
- /* Site Search */
534
-
535
440
  /* Articles */
536
441
 
537
442
  .post-list {
@@ -694,6 +599,8 @@ table {
694
599
  padding-left: 0.6rem;
695
600
  }
696
601
 
602
+ /* Post meta */
603
+
697
604
  .post-meta {
698
605
  &:not(.mini) {
699
606
  border-top: 1px solid var(--icon-block);
@@ -827,8 +734,6 @@ table {
827
734
  }
828
735
  }
829
736
 
830
- /* Taxonomy */
831
-
832
737
  /* Video */
833
738
 
834
739
  .yt-video {
@@ -9,8 +9,16 @@ import fs from 'fs';
9
9
  import path from 'path';
10
10
  import sharp from 'sharp';
11
11
 
12
+ // Used for non-avif formats
12
13
  const quality = 70;
13
14
 
15
+ // For avif
16
+ const avifOptions = {
17
+ quality: 50,
18
+ effort: 4,
19
+ chromaSubsampling: '4:4:4',
20
+ };
21
+
14
22
  const workingDirectory = process.cwd();
15
23
 
16
24
  const imageSize = await import(
@@ -135,7 +143,7 @@ for (const file of filesToProcess) {
135
143
  break;
136
144
  case '.avif':
137
145
  sharp(source)
138
- .avif({ quality: quality })
146
+ .avif(avifOptions)
139
147
  .toFile(destination + '.avif');
140
148
  break;
141
149
  }
@@ -166,12 +174,12 @@ for (const file of filesToProcess) {
166
174
  // Only resize if the image is larger than the target size
167
175
  sharp(source)
168
176
  .resize(size[key], null)
169
- .avif({ quality: quality })
177
+ .avif(avifOptions)
170
178
  .toFile(resizeDestination + '.avif');
171
179
  } else {
172
180
  // Don't resize as it's smaller than target size
173
181
  sharp(source)
174
- .avif({ quality: quality })
182
+ .avif(avifOptions)
175
183
  .toFile(resizeDestination + '.avif');
176
184
  }
177
185
  }
File without changes
File without changes