astro-accelerator 5.10.26 → 5.10.29
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": "5.10.
|
|
2
|
+
"version": "5.10.29",
|
|
3
3
|
"author": "Steve Fenton",
|
|
4
4
|
"name": "astro-accelerator",
|
|
5
5
|
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@astrojs/mdx": "^4.3.13",
|
|
38
38
|
"@img/sharp-linux-x64": "^0.34.5",
|
|
39
|
-
"astro": "^5.16.
|
|
40
|
-
"astro-accelerator-utils": "^0.3.
|
|
39
|
+
"astro": "^5.16.7",
|
|
40
|
+
"astro-accelerator-utils": "^0.3.64",
|
|
41
41
|
"cspell": "^9.4.0",
|
|
42
42
|
"csv": "^6.4.1",
|
|
43
43
|
"glob": "^13.0.0",
|
|
@@ -12,10 +12,10 @@ stats.start();
|
|
|
12
12
|
|
|
13
13
|
// Properties
|
|
14
14
|
type Props = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
lang: string;
|
|
16
|
+
frontmatter: Frontmatter;
|
|
17
|
+
headings: { depth: number; slug: string; text: string }[];
|
|
18
|
+
breadcrumbs?: { url: string; title: string; ariaCurrent?: string }[] | null;
|
|
19
19
|
};
|
|
20
20
|
const { lang, breadcrumbs } = Astro.props satisfies Props;
|
|
21
21
|
|
|
@@ -26,30 +26,31 @@ const _ = Lang(lang);
|
|
|
26
26
|
const currentUrl = new URL(Astro.request.url);
|
|
27
27
|
const navPages = accelerator.navigation.breadcrumbs(currentUrl, SITE.subfolder, breadcrumbs?.length ?? 0);
|
|
28
28
|
|
|
29
|
-
for (let i = 0; i < navPages.length; i++) {
|
|
30
|
-
navPages[i].title = navPages[i].section || navPages[i].title;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// The last breadcrumb should use the full name
|
|
34
|
-
//navPages[navPages.length -1].title = navPages[navPages.length -1].fullTitle;
|
|
35
|
-
|
|
36
29
|
let metaIndex = navPages.length;
|
|
37
30
|
|
|
38
31
|
stats.stop();
|
|
39
32
|
---
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
33
|
+
|
|
34
|
+
<nav class="site-breadcrumbs" aria-label={_(Translations.aria.breadcrumbs)}>
|
|
35
|
+
<ol vocab="http://schema.org/" typeof="BreadcrumbList">
|
|
36
|
+
{
|
|
37
|
+
navPages.map((page, index) => (
|
|
38
|
+
<li property="itemListElement" typeof="ListItem">
|
|
39
|
+
<meta property="position" content={index.toString()} />
|
|
40
|
+
<a property="item" typeof="WebPage" href={accelerator.urlFormatter.formatAddress(page.url)} aria-current={page.ariaCurrent ? page.ariaCurrent : null} rel={page.rel}>
|
|
41
|
+
<span property="name">{page.title}</span></a>
|
|
42
|
+
</li>
|
|
43
|
+
))
|
|
44
|
+
}
|
|
45
|
+
{
|
|
46
|
+
breadcrumbs &&
|
|
47
|
+
breadcrumbs.map(crumb => (
|
|
48
|
+
<li property="itemListElement" typeof="ListItem">
|
|
49
|
+
<meta property="position" content={(metaIndex++).toString()} />
|
|
50
|
+
<a property="item" typeof="WebPage" href={accelerator.urlFormatter.formatAddress(crumb.url)} aria-current={crumb.ariaCurrent ? crumb.ariaCurrent : null}>
|
|
51
|
+
<span property="name">{crumb.title}</span></a>
|
|
52
|
+
</li>
|
|
53
|
+
))
|
|
54
|
+
}
|
|
55
|
+
</ol>
|
|
56
|
+
</nav>
|