astro-accelerator 4.1.12 → 4.1.14
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": "4.1.
|
|
2
|
+
"version": "4.1.14",
|
|
3
3
|
"author": "Steve Fenton",
|
|
4
4
|
"name": "astro-accelerator",
|
|
5
5
|
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@astrojs/mdx": "^2.3.1",
|
|
35
|
-
"astro": "^4.16.
|
|
36
|
-
"astro-accelerator-utils": "^0.3.
|
|
37
|
-
"cspell": "^8.16.
|
|
38
|
-
"csv": "^6.3.
|
|
35
|
+
"astro": "^4.16.16",
|
|
36
|
+
"astro-accelerator-utils": "^0.3.29",
|
|
37
|
+
"cspell": "^8.16.1",
|
|
38
|
+
"csv": "^6.3.11",
|
|
39
39
|
"glob": "^11.0.0",
|
|
40
|
-
"hast-util-from-selector": "^3.0.
|
|
40
|
+
"hast-util-from-selector": "^3.0.1",
|
|
41
41
|
"html-to-text": "^9.0.5",
|
|
42
42
|
"keyword-extractor": "^0.0.28",
|
|
43
43
|
"optional": "^0.1.4",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"sharp": "^0.33.5"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@playwright/test": "^1.
|
|
48
|
+
"@playwright/test": "^1.49.0"
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
".npmrc",
|
|
@@ -25,26 +25,41 @@ const canonicalImageSrc = new URL(imageSrc, Astro.site);
|
|
|
25
25
|
const canonicalURL = accelerator.urlFormatter.formatUrl(new URL(Astro.url.pathname, Astro.site + SITE.subfolder));
|
|
26
26
|
const socialTitle = await accelerator.markdown.getTextFrom(frontmatter?.title);
|
|
27
27
|
const title = `${ accelerator.markdown.titleCase(socialTitle) } ${ ((frontmatter.titleAdditional) ? ` ${frontmatter.titleAdditional}` : '') } | ${ SITE.title }`;
|
|
28
|
+
const pageMeta = (frontmatter?.meta && frontmatter?.meta?.length > 0)
|
|
29
|
+
? frontmatter.meta
|
|
30
|
+
: [];
|
|
28
31
|
|
|
29
32
|
const authorList = accelerator.authors.forPost(frontmatter);
|
|
30
33
|
const authorMeta = (authorList.mainAuthor?.frontmatter?.meta && authorList.mainAuthor?.frontmatter?.meta?.length > 0)
|
|
31
34
|
? authorList.mainAuthor.frontmatter.meta
|
|
32
35
|
: [];
|
|
33
36
|
|
|
37
|
+
const autoMeta = (name: string) => {
|
|
38
|
+
return pageMeta.filter(m => m.name.toLowerCase() === name).length === 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
34
41
|
stats.stop();
|
|
35
42
|
---
|
|
36
43
|
<head>
|
|
37
44
|
<meta charset="utf-8" />
|
|
38
45
|
<title>{ title }</title>
|
|
39
46
|
<meta name="robots" content={ 'max-image-preview:large, ' + robots } />
|
|
40
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
|
41
|
-
<meta name="format-detection" content="telephone=no" />
|
|
42
47
|
<meta name="keywords" content={ frontmatter.keywords } />
|
|
43
48
|
<meta name="description" content={ frontmatter.description } />
|
|
44
|
-
<meta name="theme-color" content={ SITE.themeColor } />
|
|
45
49
|
<link rel="stylesheet" href={ SITE.subfolder + '/css/vars.css' } />
|
|
46
50
|
<link rel="stylesheet" href={ SITE.subfolder + '/css/main.css' } />
|
|
51
|
+
{autoMeta('viewport') &&
|
|
52
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" />
|
|
53
|
+
}
|
|
54
|
+
{autoMeta('format-detection') &&
|
|
55
|
+
<meta name="format-detection" content="telephone=no" />
|
|
56
|
+
}
|
|
57
|
+
{autoMeta('theme-color') &&
|
|
58
|
+
<meta name="theme-color" content={ SITE.themeColor } />
|
|
59
|
+
}
|
|
60
|
+
{autoMeta('canonical') &&
|
|
47
61
|
<link rel="canonical" href={ canonicalURL } />
|
|
62
|
+
}
|
|
48
63
|
{SITE.feedUrl &&
|
|
49
64
|
<link rel="alternate" type="application/atom+xml" title={ SITE.title } href={ SITE.feedUrl } />
|
|
50
65
|
}
|
|
@@ -57,14 +72,17 @@ stats.stop();
|
|
|
57
72
|
<meta property="og:description" content={ frontmatter.description } />
|
|
58
73
|
<meta property="og:image" content={ canonicalImageSrc } />
|
|
59
74
|
<meta property="og:image:alt" content={ imageAlt } />
|
|
60
|
-
{authorMeta.map(m =>
|
|
61
|
-
<meta name={ m.name } content={ m.content } />
|
|
62
|
-
)}
|
|
63
75
|
<meta name="twitter:card" content="summary_large_image" />
|
|
64
76
|
<meta name="twitter:title" content={ socialTitle } />
|
|
65
77
|
<meta name="twitter:description" content={ frontmatter.description } />
|
|
66
78
|
<meta name="twitter:image" content={ canonicalImageSrc } />
|
|
67
79
|
<meta name="twitter:image:alt" content={ imageAlt } />
|
|
68
80
|
<meta name="view-transition" content="same-origin" />
|
|
81
|
+
{pageMeta.map(m =>
|
|
82
|
+
<meta name={ m.name } content={ m.content } />
|
|
83
|
+
)}
|
|
84
|
+
{authorMeta.map(m =>
|
|
85
|
+
<meta name={ m.name } content={ m.content } />
|
|
86
|
+
)}
|
|
69
87
|
<Fragment set:html={ HEADER_SCRIPTS }></Fragment>
|
|
70
88
|
</head>
|