astro-accelerator 7.1.17 → 7.1.19
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 +7 -7
- package/public/css/main.7.1.16.css +13 -2
- package/public/css/{main.7.1.12.css → main.7.1.18.css} +13 -2
- package/public/css/{main.7.1.13.css → main.7.1.19.css} +13 -2
- package/public/css/main.css +13 -2
- package/src/themes/accelerator/components/Authors.astro +10 -1
- package/src/themes/accelerator/components/AuthorsMini.astro +28 -12
- package/src/themes/accelerator/utilities/language.json +3 -0
- /package/public/css/{vars.7.1.12.css → vars.7.1.18.css} +0 -0
- /package/public/css/{vars.7.1.13.css → vars.7.1.19.css} +0 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "7.1.
|
|
2
|
+
"version": "7.1.19",
|
|
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.
|
|
39
|
-
"@astrojs/mdx": "^
|
|
38
|
+
"@astrojs/markdown-remark": "^7.3.0",
|
|
39
|
+
"@astrojs/mdx": "^8.0.0",
|
|
40
40
|
"@img/sharp-linux-x64": "^0.35.4",
|
|
41
|
-
"astro": "^7.
|
|
42
|
-
"astro-accelerator-utils": "^0.3.
|
|
41
|
+
"astro": "^7.3.1",
|
|
42
|
+
"astro-accelerator-utils": "^0.3.108",
|
|
43
43
|
"csv": "^6.6.3",
|
|
44
44
|
"hast-util-from-selector": "^3.0.1",
|
|
45
45
|
"html-to-text": "^10.0.1",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"sharp": "^0.35.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@playwright/test": "^1.
|
|
53
|
-
"cspell": "^10.
|
|
52
|
+
"@playwright/test": "^1.63.0",
|
|
53
|
+
"cspell": "^10.2.2",
|
|
54
54
|
"glob": "^13.0.6",
|
|
55
55
|
"linkinator": "^8.1.0"
|
|
56
56
|
},
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
|
@@ -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
|
}
|
package/public/css/main.css
CHANGED
|
@@ -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
|
}
|
|
@@ -29,6 +29,11 @@ const authorImage = authorList?.image?.src
|
|
|
29
29
|
? getImageInfo(authorList.image.src, 'author-image', SITE.images.authorSize)
|
|
30
30
|
: null;
|
|
31
31
|
|
|
32
|
+
const canonical = frontmatter.meta?.find(
|
|
33
|
+
(meta) => meta.name.toLowerCase() === 'canonical',
|
|
34
|
+
)?.content;
|
|
35
|
+
const canonicalDomain = canonical ? new URL(canonical).hostname : undefined;
|
|
36
|
+
|
|
32
37
|
stats.stop();
|
|
33
38
|
---
|
|
34
39
|
{authorList.writers.length > 0 &&
|
|
@@ -58,7 +63,11 @@ stats.stop();
|
|
|
58
63
|
<br /><time datetime={ frontmatter.modDate.toString() } itemprop="dateModified">
|
|
59
64
|
{ _(Translations.post.last_modified) + ' ' + accelerator.dateFormatter.formatDate(frontmatter.modDate, lang) }
|
|
60
65
|
</time>
|
|
61
|
-
}
|
|
66
|
+
}
|
|
67
|
+
{canonical &&
|
|
68
|
+
<br /><span set:html={ _(Translations.post.originally_published).replace('{link}', `<a href="${canonical}">${canonicalDomain}</a>`) }></span>
|
|
69
|
+
}
|
|
70
|
+
{authorList.mainAuthor &&
|
|
62
71
|
<p>{ authorList.mainAuthor.frontmatter.description }</p>
|
|
63
72
|
}
|
|
64
73
|
</div>
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
// warning: This file is overwritten by Astro Accelerator
|
|
3
3
|
|
|
4
|
-
import { Accelerator } from
|
|
5
|
-
import type { Frontmatter } from
|
|
6
|
-
import { SITE } from
|
|
7
|
-
import { Translations, Lang } from
|
|
8
|
-
import { getImageInfo } from
|
|
9
|
-
import ReadingTime from
|
|
4
|
+
import { Accelerator } from "astro-accelerator-utils";
|
|
5
|
+
import type { Frontmatter } from "astro-accelerator-utils/types/Frontmatter";
|
|
6
|
+
import { SITE } from "@config";
|
|
7
|
+
import { Translations, Lang } from "@util/Languages";
|
|
8
|
+
import { getImageInfo } from "@util/custom-markdown.mjs";
|
|
9
|
+
import ReadingTime from "@components/ReadingTime.astro";
|
|
10
10
|
|
|
11
11
|
const accelerator = new Accelerator(SITE);
|
|
12
12
|
const stats = new accelerator.statistics(
|
|
13
|
-
|
|
13
|
+
"accelerator/components/AuthorsMini.astro",
|
|
14
14
|
);
|
|
15
15
|
stats.start();
|
|
16
16
|
|
|
@@ -31,9 +31,14 @@ const dateToShow =
|
|
|
31
31
|
|
|
32
32
|
// Get image info
|
|
33
33
|
const authorImage = authorList?.image?.src
|
|
34
|
-
? getImageInfo(authorList.image.src,
|
|
34
|
+
? getImageInfo(authorList.image.src, "author-image", SITE.images.authorSize)
|
|
35
35
|
: null;
|
|
36
36
|
|
|
37
|
+
const canonical = frontmatter.meta?.find(
|
|
38
|
+
(meta) => meta.name.toLowerCase() === "canonical",
|
|
39
|
+
)?.content;
|
|
40
|
+
const canonicalDomain = canonical ? new URL(canonical).hostname : undefined;
|
|
41
|
+
|
|
37
42
|
stats.stop();
|
|
38
43
|
---
|
|
39
44
|
|
|
@@ -56,8 +61,8 @@ stats.stop();
|
|
|
56
61
|
<a
|
|
57
62
|
href={
|
|
58
63
|
accelerator.urlFormatter.formatAddress(
|
|
59
|
-
authorList.mainAuthor.url
|
|
60
|
-
) +
|
|
64
|
+
authorList.mainAuthor.url,
|
|
65
|
+
) + "1/"
|
|
61
66
|
}
|
|
62
67
|
class="author-name">
|
|
63
68
|
{authorList.mainAuthor.frontmatter.title}
|
|
@@ -67,7 +72,7 @@ stats.stop();
|
|
|
67
72
|
<a
|
|
68
73
|
href={
|
|
69
74
|
accelerator.urlFormatter.formatAddress(writer.url) +
|
|
70
|
-
|
|
75
|
+
"1/"
|
|
71
76
|
}
|
|
72
77
|
class="contributor-name">
|
|
73
78
|
{writer.frontmatter.title}
|
|
@@ -78,10 +83,21 @@ stats.stop();
|
|
|
78
83
|
datetime={dateToShow.toString()}
|
|
79
84
|
set:html={accelerator.dateFormatter.formatShortDate(
|
|
80
85
|
dateToShow,
|
|
81
|
-
lang
|
|
86
|
+
lang,
|
|
82
87
|
)}
|
|
83
88
|
/>
|
|
84
89
|
<ReadingTime lang={lang} frontmatter={frontmatter} />
|
|
90
|
+
{canonical && (
|
|
91
|
+
<span
|
|
92
|
+
class="originally-published"
|
|
93
|
+
set:html={_(
|
|
94
|
+
Translations.post.originally_published,
|
|
95
|
+
).replace(
|
|
96
|
+
"{link}",
|
|
97
|
+
`<a href="${canonical}">${canonicalDomain}</a>`,
|
|
98
|
+
)}
|
|
99
|
+
/>
|
|
100
|
+
)}
|
|
85
101
|
</div>
|
|
86
102
|
</div>
|
|
87
103
|
)
|
|
File without changes
|
|
File without changes
|