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.0",
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
- "homepage": "https://astro.stevefenton.co.uk/",
12
- "bugs": "https://github.com/Steve-Fenton/astro-accelerator/issues",
13
- "license": "(Apache-2.0)",
14
- "repository": {
15
- "url": "https://github.com/Steve-Fenton/astro-accelerator"
16
- },
17
- "scripts": {
18
- "img": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs",
19
- "dev": "node --no-experimental-fetch ./src/themes/accelerator/utilities/img.mjs && astro dev",
20
- "stats": "node --no-experimental-fetch ./src/themes/accelerator/utilities/stats.mjs",
21
- "test": "astro build && npx playwright install --with-deps && npx playwright test",
22
- "build": "astro build",
23
- "preview": "astro preview",
24
- "astro": "astro",
25
- "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
26
- },
27
- "dependencies": {
28
- "@astrojs/mdx": "^1.0.0",
29
- "astro": "^3.0.0",
30
- "astro-accelerator-utils": "^0.2.39",
31
- "csv": "^6.3.3",
32
- "hast-util-from-selector": "^3.0.0",
33
- "html-to-text": "^9.0.5",
34
- "keyword-extractor": "^0.0.25",
35
- "remark-directive": "^2.0.1",
36
- "sharp": "^0.32.5"
37
- },
38
- "devDependencies": {
39
- "@playwright/test": "^1.36.2"
40
- },
41
- "engines": {
42
- "node": "*"
43
- },
44
- "files": [
45
- ".npmrc",
46
- "env.d.ts",
47
- "tsconfig.json",
48
- "astro.config.mjs",
49
- "sample/*",
50
- "sample/**/*",
51
- "src/config.ts",
52
- "src/pages/index.md",
53
- "src/pages/search.md",
54
- "src/pages/authors/[[]author[]]/[[]page[]].astro",
55
- "src/pages/articles/[[]page[]].astro",
56
- "src/pages/articles/index.astro",
57
- "src/pages/articles/feed.xml.ts",
58
- "src/pages/category/[[]category[]]/[[]page[]].astro",
59
- "src/pages/category/[[]category[]]/index.astro",
60
- "src/pages/tag/[[]tag[]]/[[]page[]].astro",
61
- "src/pages/tag/[[]tag[]]/index.astro",
62
- "src/pages/search.json.ts",
63
- "src/pages/sitemap.xml.ts",
64
- "src/pages/report/*",
65
- "src/layouts/*",
66
- "src/themes/**/*",
67
- "src/data/*",
68
- "public/img/astro-lighthouse.png",
69
- "public/icons/**/*",
70
- "public/css/**/*",
71
- "public/js/**/*"
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
+ }
@@ -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
- height: calc(100vh - 4em);
708
- width: calc(100vw - 6em);
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
 
@@ -24,7 +24,7 @@
24
24
  --fore-block: #333;
25
25
  --aft-block: #F3F5FF;
26
26
  --icon-block: #4D71FF;
27
-
27
+
28
28
  --fore-table-head: #FDFDFE;
29
29
  --aft-table-head: #2F3141;
30
30
  --fore-table-row-odd: #333;
@@ -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 get = getData;
64
+ export const GET = getData;
@@ -62,9 +62,12 @@ const getData = async () => {
62
62
  });
63
63
  }
64
64
 
65
- return {
66
- body: JSON.stringify(items)
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 get = getData;
73
+ export const GET = getData;
@@ -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 get = getData;
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) } &copy; { new Date().getFullYear() } { SITE.owner }</p>
25
+ <p>{ _(Translations.footer.copyright) } &copy; { 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>