astro-accelerator 7.1.21 → 7.1.23
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 +8 -6
- package/public/css/main.7.1.20.css +1 -0
- package/public/css/{main.7.1.16.css → main.7.1.22.css} +5 -2
- package/public/css/{main.7.1.17.css → main.7.1.23.css} +18 -4
- package/src/data/images.mjs +1 -1
- package/src/themes/accelerator/utilities/custom-markdown.mjs +1 -1
- package/src/themes/accelerator/utilities/dist-thinner.mjs +9 -5
- package/src/themes/accelerator/utilities/img.mjs +13 -8
- /package/public/css/{vars.7.1.16.css → vars.7.1.22.css} +0 -0
- /package/public/css/{vars.7.1.17.css → vars.7.1.23.css} +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.1.
|
|
2
|
+
"version": "7.1.23",
|
|
3
3
|
"author": "Steve Fenton",
|
|
4
4
|
"name": "astro-accelerator",
|
|
5
5
|
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
"refresh": "npm version patch && pnpm css-version && pnpm update --latest && pnpm test",
|
|
24
24
|
"update-node": "bash -c 'source $NVM_DIR/nvm.sh && nvm install --lts && npm install -g pnpm'",
|
|
25
25
|
"img": "node ./src/themes/accelerator/utilities/img.mjs",
|
|
26
|
+
"img:reset": "rimraf --glob 'public/img/**/*.json'",
|
|
26
27
|
"css-version": "node ./src/themes/accelerator/utilities/css-version.mjs",
|
|
27
28
|
"dev": "pnpm css-version && node ./src/themes/accelerator/utilities/img.mjs && astro dev",
|
|
28
29
|
"stats": "node ./src/themes/accelerator/utilities/stats.mjs",
|
|
29
30
|
"spellcheck": "git fetch origin main:refs/remotes/origin/main && git diff origin/main --name-only --diff-filter=ACMRTUXB | cspell --no-must-find-files --file-list stdin",
|
|
30
31
|
"test": "astro build && npx playwright install chromium --with-deps && npx playwright test",
|
|
31
|
-
"crawl": "linkinator ./dist --skip \"^(?!http://
|
|
32
|
+
"crawl": "linkinator ./dist --skip \"^(?!http://127.0.0.1)\" --skip \"/404/\" --recurse --verbosity error",
|
|
32
33
|
"build": "pnpm css-version && astro build",
|
|
33
34
|
"preview": "astro preview",
|
|
34
35
|
"astro": "astro",
|
|
@@ -38,8 +39,8 @@
|
|
|
38
39
|
"@astrojs/markdown-remark": "^7.3.1",
|
|
39
40
|
"@astrojs/mdx": "^8.0.1",
|
|
40
41
|
"@img/sharp-linux-x64": "^0.35.4",
|
|
41
|
-
"astro": "^7.3.
|
|
42
|
-
"astro-accelerator-utils": "^0.3.
|
|
42
|
+
"astro": "^7.3.3",
|
|
43
|
+
"astro-accelerator-utils": "^0.3.110",
|
|
43
44
|
"csv": "^6.6.3",
|
|
44
45
|
"hast-util-from-selector": "^3.0.1",
|
|
45
46
|
"html-to-text": "^10.0.1",
|
|
@@ -50,9 +51,10 @@
|
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@playwright/test": "^1.63.0",
|
|
53
|
-
"cspell": "^10.3.
|
|
54
|
+
"cspell": "^10.3.3",
|
|
54
55
|
"glob": "^13.0.6",
|
|
55
|
-
"linkinator": "^8.1.0"
|
|
56
|
+
"linkinator": "^8.1.0",
|
|
57
|
+
"rimraf": "^6.1.3"
|
|
56
58
|
},
|
|
57
59
|
"files": [
|
|
58
60
|
"pnpm-workspace.yaml",
|
|
@@ -807,16 +807,19 @@ table {
|
|
|
807
807
|
}
|
|
808
808
|
|
|
809
809
|
.author-page {
|
|
810
|
-
display:
|
|
810
|
+
display: grid;
|
|
811
|
+
grid-template-columns: 1fr 2fr;
|
|
811
812
|
gap: var(--grid-gap);
|
|
812
813
|
|
|
813
814
|
@media (max-width: 860px) {
|
|
814
|
-
|
|
815
|
+
display: block;
|
|
815
816
|
}
|
|
816
817
|
}
|
|
817
818
|
|
|
818
819
|
.author-page>img {
|
|
819
820
|
align-self: self-start;
|
|
821
|
+
width: 100%;
|
|
822
|
+
height: auto;
|
|
820
823
|
|
|
821
824
|
@media (max-width: 860px) {
|
|
822
825
|
display: block;
|
|
@@ -734,10 +734,14 @@ table {
|
|
|
734
734
|
font-size: var(--font-size-meta);
|
|
735
735
|
margin: 0 0 var(--paragraph-margin) 0;
|
|
736
736
|
|
|
737
|
+
a {
|
|
738
|
+
text-decoration: none;
|
|
739
|
+
}
|
|
740
|
+
|
|
737
741
|
& > .author-info {
|
|
738
742
|
|
|
739
|
-
& > *:nth-child(n +
|
|
740
|
-
content: '
|
|
743
|
+
& > *:nth-child(n + 2):not(:last-child)::after {
|
|
744
|
+
content: '•';
|
|
741
745
|
padding: 0 0.3rem;
|
|
742
746
|
opacity: 0.5;
|
|
743
747
|
}
|
|
@@ -747,6 +751,13 @@ table {
|
|
|
747
751
|
height: 1rem;
|
|
748
752
|
margin: 0 0.3rem 0 0;
|
|
749
753
|
width: 1rem;
|
|
754
|
+
transform: translateY(-0.1em);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
& .originally-published {
|
|
759
|
+
@media (max-width: 860px) {
|
|
760
|
+
display: block;
|
|
750
761
|
}
|
|
751
762
|
}
|
|
752
763
|
}
|
|
@@ -796,16 +807,19 @@ table {
|
|
|
796
807
|
}
|
|
797
808
|
|
|
798
809
|
.author-page {
|
|
799
|
-
display:
|
|
810
|
+
display: grid;
|
|
811
|
+
grid-template-columns: 1fr 2fr;
|
|
800
812
|
gap: var(--grid-gap);
|
|
801
813
|
|
|
802
814
|
@media (max-width: 860px) {
|
|
803
|
-
|
|
815
|
+
display: block;
|
|
804
816
|
}
|
|
805
817
|
}
|
|
806
818
|
|
|
807
819
|
.author-page>img {
|
|
808
820
|
align-self: self-start;
|
|
821
|
+
width: 100%;
|
|
822
|
+
height: auto;
|
|
809
823
|
|
|
810
824
|
@media (max-width: 860px) {
|
|
811
825
|
display: block;
|
package/src/data/images.mjs
CHANGED
|
@@ -53,15 +53,16 @@ async function recurseFiles(directory) {
|
|
|
53
53
|
case '.jpeg':
|
|
54
54
|
case '.png':
|
|
55
55
|
case '.webp':
|
|
56
|
+
case '.avif':
|
|
56
57
|
const sourcePath = path.join(directory, file.name);
|
|
57
58
|
|
|
58
|
-
const
|
|
59
|
-
/.jpg$|.jpeg$|.png$/,
|
|
60
|
-
'.
|
|
59
|
+
const avif = sourcePath.replace(
|
|
60
|
+
/.jpg$|.jpeg$|.png$|.webp$/,
|
|
61
|
+
'.avif'
|
|
61
62
|
);
|
|
62
63
|
const info = {
|
|
63
64
|
path: sourcePath,
|
|
64
|
-
|
|
65
|
+
avif: avif,
|
|
65
66
|
};
|
|
66
67
|
|
|
67
68
|
// Only processes images where there is no json metadata file
|
|
@@ -116,6 +117,9 @@ for (const file of filesToProcess) {
|
|
|
116
117
|
case '.webp':
|
|
117
118
|
fs.unlinkSync(destination + '.webp');
|
|
118
119
|
break;
|
|
120
|
+
case '.avif':
|
|
121
|
+
fs.unlinkSync(destination + '.avif');
|
|
122
|
+
break;
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
const metaFile = source + '.json';
|
|
@@ -130,6 +134,6 @@ for (const file of filesToProcess) {
|
|
|
130
134
|
size[key]
|
|
131
135
|
);
|
|
132
136
|
|
|
133
|
-
fs.unlinkSync(resizeDestination + '.
|
|
137
|
+
fs.unlinkSync(resizeDestination + '.avif');
|
|
134
138
|
}
|
|
135
139
|
}
|
|
@@ -59,13 +59,13 @@ async function recurseFiles(directory) {
|
|
|
59
59
|
if (supportedImageExtensions.includes(ext)) {
|
|
60
60
|
const sourcePath = path.join(directory, file.name);
|
|
61
61
|
|
|
62
|
-
const
|
|
63
|
-
/.jpg$|.jpeg$|.png$/i,
|
|
64
|
-
'.
|
|
62
|
+
const avif = sourcePath.replace(
|
|
63
|
+
/.jpg$|.jpeg$|.png$|.webp$/i,
|
|
64
|
+
'.avif'
|
|
65
65
|
);
|
|
66
66
|
const info = {
|
|
67
67
|
path: sourcePath,
|
|
68
|
-
|
|
68
|
+
avif: avif,
|
|
69
69
|
};
|
|
70
70
|
|
|
71
71
|
const fullDestination = path.join(
|
|
@@ -131,6 +131,11 @@ for (const file of filesToProcess) {
|
|
|
131
131
|
.webp({ quality: 80 })
|
|
132
132
|
.toFile(destination + '.webp');
|
|
133
133
|
break;
|
|
134
|
+
case '.avif':
|
|
135
|
+
sharp(source)
|
|
136
|
+
.avif({ quality: 80 })
|
|
137
|
+
.toFile(destination + '.avif');
|
|
138
|
+
break;
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
const info = await sharp(source).metadata();
|
|
@@ -159,13 +164,13 @@ for (const file of filesToProcess) {
|
|
|
159
164
|
// Only resize if the image is larger than the target size
|
|
160
165
|
sharp(source)
|
|
161
166
|
.resize(size[key], null)
|
|
162
|
-
.
|
|
163
|
-
.toFile(resizeDestination + '.
|
|
167
|
+
.avif({ quality: 90 })
|
|
168
|
+
.toFile(resizeDestination + '.avif');
|
|
164
169
|
} else {
|
|
165
170
|
// Don't resize as it's smaller than target size
|
|
166
171
|
sharp(source)
|
|
167
|
-
.
|
|
168
|
-
.toFile(resizeDestination + '.
|
|
172
|
+
.avif({ quality: 90 })
|
|
173
|
+
.toFile(resizeDestination + '.avif');
|
|
169
174
|
}
|
|
170
175
|
}
|
|
171
176
|
}
|
|
File without changes
|
|
File without changes
|