astro-accelerator 5.10.19 → 5.10.21

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/README.md CHANGED
@@ -29,9 +29,13 @@ pnpm install --include=optional sharp
29
29
  pnpm install --force @img/sharp-linux-x64
30
30
  ```
31
31
 
32
- ## Publish to NPM
32
+ ## Publish to N
33
33
 
34
- Update the `package.json` with the new version number, and commit the change.
34
+ Run the command:
35
+
36
+ pnpm refresh
37
+
38
+ This updates dependencies, increments the version number, and runs tests. On commit to main, the build will upload the new package to NPM.
35
39
 
36
40
  The NPM token expires periodically and must be updated in GitHub settings -> Secrets -> Actions.
37
41
 
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.10.19",
2
+ "version": "5.10.21",
3
3
  "author": "Steve Fenton",
4
4
  "name": "astro-accelerator",
5
5
  "description": "A super-lightweight, accessible, SEO-friendly starter project for Astro",
@@ -33,11 +33,11 @@
33
33
  "dts": "tsc ./tests/locate-content.js ./tests/locate-navigation.js ./tests/locate-search.js --allowJs --declaration --emitDeclarationOnly"
34
34
  },
35
35
  "dependencies": {
36
- "@astrojs/mdx": "^4.3.7",
37
- "@img/sharp-linux-x64": "^0.34.4",
38
- "astro": "^5.14.4",
39
- "astro-accelerator-utils": "^0.3.57",
40
- "cspell": "^9.2.1",
36
+ "@astrojs/mdx": "^4.3.10",
37
+ "@img/sharp-linux-x64": "^0.34.5",
38
+ "astro": "^5.15.5",
39
+ "astro-accelerator-utils": "^0.3.59",
40
+ "cspell": "^9.3.1",
41
41
  "csv": "^6.4.1",
42
42
  "glob": "^11.0.3",
43
43
  "hast-util-from-selector": "^3.0.1",
@@ -46,10 +46,10 @@
46
46
  "linkinator": "^6.3.0",
47
47
  "optional": "^0.1.4",
48
48
  "remark-directive": "^4.0.0",
49
- "sharp": "^0.34.4"
49
+ "sharp": "^0.34.5"
50
50
  },
51
51
  "devDependencies": {
52
- "@playwright/test": "^1.56.0"
52
+ "@playwright/test": "^1.56.1"
53
53
  },
54
54
  "files": [
55
55
  ".npmrc",
@@ -13,9 +13,9 @@ stats.start();
13
13
 
14
14
  // Properties
15
15
  type Props = {
16
- lang: string;
17
- page: Page<MarkdownInstance<Record<string, any>>>,
18
- pageLinks: Link[],
16
+ lang: string;
17
+ page: Page<MarkdownInstance<Record<string, any>>>;
18
+ pageLinks: Link[];
19
19
  };
20
20
  const { lang, page, pageLinks } = Astro.props satisfies Props;
21
21
 
@@ -25,14 +25,28 @@ const _ = Lang(lang);
25
25
  // Logic
26
26
  stats.stop();
27
27
  ---
28
- <nav class="post-paging" aria-label={ _(Translations.aria.paging) }>
29
- {page.url.prev
30
- ? <a href={ accelerator.urlFormatter.formatAddress(page.url.prev) }>{ _(Translations.articles.previous) }</a>
31
- : <span>{ _(Translations.articles.previous) }</span>}
32
- {pageLinks.map((link) => (
33
- <a href={ accelerator.urlFormatter.formatAddress(link.url) } aria-current={ link.ariaCurrent ? link.ariaCurrent : null } class={ link.class }>{ link.title }</a>
34
- ))}
35
- {page.url.next
36
- ? <a href={ accelerator.urlFormatter.formatAddress(page.url.next) }>{ _(Translations.articles.next) }</a>
37
- : <span>{ _(Translations.articles.next) }</span>}
38
- </nav>
28
+
29
+ {
30
+ page.lastPage > 1 && (
31
+ <nav class="post-paging" aria-label={_(Translations.aria.paging)}>
32
+ {page.url.prev ? (
33
+ <a href={accelerator.urlFormatter.formatAddress(page.url.prev)}>{_(Translations.articles.previous)}</a>
34
+ ) : (
35
+ <span>{_(Translations.articles.previous)}</span>
36
+ )}
37
+ {pageLinks.map(link => (
38
+ <a
39
+ href={accelerator.urlFormatter.formatAddress(link.url)}
40
+ aria-current={link.ariaCurrent ? link.ariaCurrent : null}
41
+ class={link.class}>
42
+ {link.title}
43
+ </a>
44
+ ))}
45
+ {page.url.next ? (
46
+ <a href={accelerator.urlFormatter.formatAddress(page.url.next)}>{_(Translations.articles.next)}</a>
47
+ ) : (
48
+ <span>{_(Translations.articles.next)}</span>
49
+ )}
50
+ </nav>
51
+ )
52
+ }