astro-accelerator 0.3.0 → 0.3.2
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,73 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "0.3.
|
|
3
|
-
"author": "Steve Fenton",
|
|
4
|
-
"name": "astro-accelerator",
|
|
5
|
-
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
6
|
-
"keywords": [
|
|
7
|
-
"astro",
|
|
8
|
-
"themes"
|
|
9
|
-
],
|
|
10
|
-
"type": "module",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"astro": "
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"src/
|
|
54
|
-
"src/pages/
|
|
55
|
-
"src/pages/
|
|
56
|
-
"src/pages/
|
|
57
|
-
"src/pages/articles/
|
|
58
|
-
"src/pages/
|
|
59
|
-
"src/pages/
|
|
60
|
-
"src/pages/
|
|
61
|
-
"src/pages/
|
|
62
|
-
"src/pages/
|
|
63
|
-
"src/pages/
|
|
64
|
-
"src/pages/
|
|
65
|
-
"src/
|
|
66
|
-
"src/
|
|
67
|
-
"src/
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"public/
|
|
71
|
-
"public/
|
|
72
|
-
|
|
73
|
-
|
|
1
|
+
{
|
|
2
|
+
"version": "0.3.2",
|
|
3
|
+
"author": "Steve Fenton",
|
|
4
|
+
"name": "astro-accelerator",
|
|
5
|
+
"description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"astro",
|
|
8
|
+
"themes"
|
|
9
|
+
],
|
|
10
|
+
"type": "module",
|
|
11
|
+
"packageManager": "pnpm@8.7.0",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=18.14.1",
|
|
14
|
+
"pnpm": ">=8.6.12"
|
|
15
|
+
},
|
|
16
|
+
"homepage": "https://astro.stevefenton.co.uk/",
|
|
17
|
+
"bugs": "https://github.com/Steve-Fenton/astro-accelerator/issues",
|
|
18
|
+
"license": "(Apache-2.0)",
|
|
19
|
+
"repository": {
|
|
20
|
+
"url": "https://github.com/Steve-Fenton/astro-accelerator"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"img": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs",
|
|
24
|
+
"dev": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs && astro dev",
|
|
25
|
+
"stats": "node --no-experimental-fetch ./src/themes/accelerator/utilities/stats.mjs",
|
|
26
|
+
"test": "astro build && npx playwright install --with-deps && npx playwright test",
|
|
27
|
+
"build": "astro build",
|
|
28
|
+
"preview": "astro preview",
|
|
29
|
+
"astro": "astro",
|
|
30
|
+
"dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@astrojs/mdx": "^1.0.0",
|
|
34
|
+
"astro": "^3.0.3",
|
|
35
|
+
"astro-accelerator-utils": "^0.2.39",
|
|
36
|
+
"csv": "^6.3.3",
|
|
37
|
+
"hast-util-from-selector": "^3.0.0",
|
|
38
|
+
"html-to-text": "^9.0.5",
|
|
39
|
+
"keyword-extractor": "^0.0.25",
|
|
40
|
+
"remark-directive": "^2.0.1",
|
|
41
|
+
"sharp": "^0.32.5"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@playwright/test": "^1.37.1"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
".npmrc",
|
|
48
|
+
"env.d.ts",
|
|
49
|
+
"tsconfig.json",
|
|
50
|
+
"astro.config.mjs",
|
|
51
|
+
"sample/*",
|
|
52
|
+
"sample/**/*",
|
|
53
|
+
"src/config.ts",
|
|
54
|
+
"src/pages/index.md",
|
|
55
|
+
"src/pages/search.md",
|
|
56
|
+
"src/pages/authors/[[]author[]]/[[]page[]].astro",
|
|
57
|
+
"src/pages/articles/[[]page[]].astro",
|
|
58
|
+
"src/pages/articles/index.astro",
|
|
59
|
+
"src/pages/articles/feed.xml.ts",
|
|
60
|
+
"src/pages/category/[[]category[]]/[[]page[]].astro",
|
|
61
|
+
"src/pages/category/[[]category[]]/index.astro",
|
|
62
|
+
"src/pages/tag/[[]tag[]]/[[]page[]].astro",
|
|
63
|
+
"src/pages/tag/[[]tag[]]/index.astro",
|
|
64
|
+
"src/pages/search.json.ts",
|
|
65
|
+
"src/pages/sitemap.xml.ts",
|
|
66
|
+
"src/pages/report/*",
|
|
67
|
+
"src/layouts/*",
|
|
68
|
+
"src/themes/**/*",
|
|
69
|
+
"src/data/*",
|
|
70
|
+
"public/img/astro-lighthouse.png",
|
|
71
|
+
"public/icons/**/*",
|
|
72
|
+
"public/css/**/*",
|
|
73
|
+
"public/js/**/*"
|
|
74
|
+
]
|
|
75
|
+
}
|
package/public/css/main.css
CHANGED
|
@@ -685,6 +685,12 @@ form.site-search #site-search-button {
|
|
|
685
685
|
box-shadow: var(--box-shadow);
|
|
686
686
|
height: calc(90vh - 4em);
|
|
687
687
|
width: calc(80vw - 6em);
|
|
688
|
+
max-width: 860px;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.search-dialog::backdrop {
|
|
692
|
+
background-color: #000;
|
|
693
|
+
opacity: 0.5;
|
|
688
694
|
}
|
|
689
695
|
|
|
690
696
|
.search-dialog form {
|
|
@@ -704,8 +710,12 @@ form.site-search #site-search-button {
|
|
|
704
710
|
|
|
705
711
|
@media (max-width: 860px) {
|
|
706
712
|
.search-dialog {
|
|
707
|
-
|
|
708
|
-
|
|
713
|
+
/* Fallback */
|
|
714
|
+
height: calc(100vh - 4rem);
|
|
715
|
+
width: calc(100vw - 6rem);
|
|
716
|
+
/* Ideal units */
|
|
717
|
+
height: calc(100dvh - 4rem);
|
|
718
|
+
width: calc(100dvw - 6rem);
|
|
709
719
|
}
|
|
710
720
|
}
|
|
711
721
|
|
package/public/css/vars.css
CHANGED
|
@@ -44,8 +44,7 @@ async function getData() {
|
|
|
44
44
|
|
|
45
45
|
stats.stop();
|
|
46
46
|
|
|
47
|
-
return
|
|
48
|
-
body: `<?xml version="1.0" encoding="utf-8"?>
|
|
47
|
+
return new Response(`<?xml version="1.0" encoding="utf-8"?>
|
|
49
48
|
<feed xmlns="http://www.w3.org/2005/Atom">
|
|
50
49
|
<title>${ SITE.title }</title>
|
|
51
50
|
<subtitle>${ SITE.description }</subtitle>
|
|
@@ -54,8 +53,12 @@ async function getData() {
|
|
|
54
53
|
<id>${ SITE.url }/atom.xml</id>
|
|
55
54
|
<updated>${ articles[0].frontmatter.pubDate }</updated>
|
|
56
55
|
${items.join('')}
|
|
57
|
-
</feed
|
|
58
|
-
|
|
56
|
+
</feed>`, {
|
|
57
|
+
status: 200,
|
|
58
|
+
headers: {
|
|
59
|
+
'Content-Type': "application/xml"
|
|
60
|
+
}
|
|
61
|
+
});
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
export const
|
|
64
|
+
export const GET = getData;
|
package/src/pages/search.json.ts
CHANGED
|
@@ -62,9 +62,12 @@ const getData = async () => {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
return {
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
return new Response(JSON.stringify(items), {
|
|
66
|
+
status: 200,
|
|
67
|
+
headers: {
|
|
68
|
+
'Content-Type': "application/json"
|
|
69
|
+
}
|
|
70
|
+
});
|
|
68
71
|
}
|
|
69
72
|
|
|
70
|
-
export const
|
|
73
|
+
export const GET = getData;
|
package/src/pages/sitemap.xml.ts
CHANGED
|
@@ -30,15 +30,18 @@ async function getData() {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
return
|
|
34
|
-
body: `<?xml version="1.0" encoding="UTF-8"?>
|
|
33
|
+
return new Response(`<?xml version="1.0" encoding="UTF-8"?>
|
|
35
34
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
36
35
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
37
36
|
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
|
|
38
37
|
http://www.sitemaps.org/schemas/sitemap/0.9.xsd">
|
|
39
38
|
${pages.join('')}
|
|
40
|
-
</urlset
|
|
41
|
-
|
|
39
|
+
</urlset>`, {
|
|
40
|
+
status: 200,
|
|
41
|
+
headers: {
|
|
42
|
+
'Content-Type': "application/xml"
|
|
43
|
+
}
|
|
44
|
+
});
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
export const
|
|
47
|
+
export const GET = getData;
|
|
@@ -22,7 +22,7 @@ const _ = Lang(lang);
|
|
|
22
22
|
// Logic
|
|
23
23
|
stats.stop();
|
|
24
24
|
---
|
|
25
|
-
<p>{ _(Translations.footer.copyright) } © { new Date().getFullYear()
|
|
25
|
+
<p>{ _(Translations.footer.copyright) } © { new Date().getFullYear() + ' ' + SITE.owner }</p>
|
|
26
26
|
<nav aria-label={ _(Translations.aria.back_to_top) }>
|
|
27
27
|
<a href="#site-top">{ _(Translations.skiplinks.skip_to_top) }</a>
|
|
28
28
|
</nav>
|