@vdaluz/astro-blog 0.9.0 → 0.10.0

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
@@ -8,12 +8,16 @@ A blog needs a listing page, pagination, related posts, tag filters, JSON-LD, RS
8
8
 
9
9
  ## Install
10
10
 
11
- Pinned https tarball from a tag (no registry needed):
11
+ ```
12
+ npm install @vdaluz/astro-blog
13
+ ```
14
+
15
+ Alternatively, a pinned https tarball from a tag works too, with no registry involved:
12
16
 
13
17
  ```jsonc
14
18
  // package.json
15
19
  "dependencies": {
16
- "@vdaluz/astro-blog": "https://github.com/vdaluz/astro-blog/archive/refs/tags/v0.7.0.tar.gz"
20
+ "@vdaluz/astro-blog": "https://github.com/vdaluz/astro-blog/archive/refs/tags/v0.9.0.tar.gz"
17
21
  }
18
22
  ```
19
23
 
@@ -21,9 +25,7 @@ Pinned https tarball from a tag (no registry needed):
21
25
  > shorthand (and even an explicit `git+https://` URL) to `git+ssh://` in the lockfile.
22
26
  > CI runners (e.g. Cloudflare Pages/Workers) have no SSH key, so `npm ci` would fail to
23
27
  > clone it. The `/archive/refs/tags/<tag>.tar.gz` URL is anonymous https with an integrity
24
- > hash in the lockfile - it just works in CI. Bump the tag in the URL to upgrade. This is the
25
- > only supported install path; there's no npm registry package (tag-tarball works for anyone,
26
- > no registry auth needed).
28
+ > hash in the lockfile - it just works in CI. Bump the tag in the URL to upgrade.
27
29
 
28
30
  Peer dependency: `astro` >= 6. For post body styling you'll also want `@tailwindcss/typography` in the app.
29
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vdaluz/astro-blog",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "Token-driven Astro blog components, related-posts scoring, a schema factory, and Shiki config - proven in production on vdaluz.com and imperfectsystems.com.",
5
5
  "keywords": [
6
6
  "astro",
package/src/lib/i18n.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type Locale = 'en' | 'es';
1
+ export type Locale = 'en' | 'es' | 'pt';
2
2
 
3
3
  interface Strings {
4
4
  readMore: string;
@@ -50,6 +50,22 @@ const STRINGS: Record<Locale, Strings> = {
50
50
  photoCredit: 'Foto:',
51
51
  via: 'vía',
52
52
  },
53
+ pt: {
54
+ readMore: 'Leia Mais',
55
+ read: 'Ler',
56
+ relatedReading: 'Leitura relacionada',
57
+ goToFirstPage: 'Ir para a primeira página',
58
+ goToPreviousPage: 'Ir para a página anterior',
59
+ goToNextPage: 'Ir para a próxima página',
60
+ goToLastPage: 'Ir para a última página',
61
+ pageOf: (current, last) => `Página ${current} de ${last}`,
62
+ onThisPage: 'Nesta página',
63
+ minRead: (minutes) => `${minutes} min de leitura`,
64
+ blogPagination: 'Paginação do blog',
65
+ filterPosts: 'Filtrar publicações',
66
+ photoCredit: 'Foto:',
67
+ via: 'via',
68
+ },
53
69
  };
54
70
 
55
71
  export function t(locale: Locale = 'en'): Strings {
@@ -59,6 +75,7 @@ export function t(locale: Locale = 'en'): Strings {
59
75
  const DATE_LOCALE: Record<Locale, string> = {
60
76
  en: 'en-US',
61
77
  es: 'es',
78
+ pt: 'pt-BR',
62
79
  };
63
80
 
64
81
  export function formatDate(date: Date, locale: Locale = 'en', options?: Intl.DateTimeFormatOptions): string {