Merge pull request #106 from mearashadowfax/starlight_i18n

Update language setting and upgrade package dependencies
This commit is contained in:
Emil Gulamov 2024-06-12 22:58:28 +04:00 committed by GitHub
commit 06755a7899
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 95 additions and 65 deletions

View file

@ -12,16 +12,16 @@ export default defineConfig({
image: {
domains: ["images.unsplash.com"],
},
i18n: {
defaultLocale: "en",
locales: ["en", "fr"],
fallback: {
fr: "en",
},
routing: {
prefixDefaultLocale: false,
},
},
// i18n: {
// defaultLocale: "en",
// locales: ["en", "fr"],
// fallback: {
// fr: "en",
// },
// routing: {
// prefixDefaultLocale: false,
// },
// },
prefetch: true,
integrations: [
tailwind(),
@ -37,6 +37,11 @@ export default defineConfig({
starlight({
title: "ScrewFast Docs",
defaultLocale: "root",
// https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG.md
// If no Astro and Starlight i18n configurations are provided, the built-in default locale is used in Starlight and a matching Astro i18n configuration is generated/used.
// If only a Starlight i18n configuration is provided, an equivalent Astro i18n configuration is generated/used.
// If only an Astro i18n configuration is provided, the Starlight i18n configuration is updated to match it.
// If both an Astro and Starlight i18n configurations are provided, an error is thrown.
locales: {
root: {
label: "English",

127
package-lock.json generated
View file

@ -9,11 +9,11 @@
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/sitemap": "^3.1.5",
"@astrojs/starlight": "^0.23.2",
"@astrojs/starlight": "^0.24.2",
"@astrojs/starlight-tailwind": "^2.0.3",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.10.2",
"@astrojs/vercel": "^7.6.0",
"astro": "^4.10.1",
"astro-compressor": "^0.4.1",
"globby": "^14.0.1",
"gsap": "^3.12.5",
@ -147,14 +147,14 @@
}
},
"node_modules/@astrojs/mdx": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-3.0.1.tgz",
"integrity": "sha512-UcPja14Qt6OEm7Wjak41Qa5f7G1M0oB2ARCsyIkXy6+Z65fJ6c1648UqEOqnEgR6Xtqq+V47wtK2qSP6KQKrAg==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@astrojs/mdx/-/mdx-3.1.0.tgz",
"integrity": "sha512-yuGDaOcCAfYgLQvUAlJDezYGK4twHlzW1Kvpyg3inxtDJuAsHdyVyYLWl0Wo5nwkyrbZktdrjnoW5scqzoAqAg==",
"dependencies": {
"@astrojs/markdown-remark": "5.1.0",
"@mdx-js/mdx": "^3.0.1",
"acorn": "^8.11.3",
"es-module-lexer": "^1.5.2",
"es-module-lexer": "^1.5.3",
"estree-util-visit": "^2.0.0",
"github-slugger": "^2.0.0",
"gray-matter": "^4.0.3",
@ -329,21 +329,21 @@
}
},
"node_modules/@astrojs/starlight": {
"version": "0.23.2",
"resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.23.2.tgz",
"integrity": "sha512-j8odYR744qCilip9s0UXNzDQ66uu1klD24zRI5Aqzxoj01eVnAsEgDPC8rU/gDTvydKWhF5diBRC1QVDN5JIYw==",
"version": "0.24.2",
"resolved": "https://registry.npmjs.org/@astrojs/starlight/-/starlight-0.24.2.tgz",
"integrity": "sha512-hXFVBHcr2a4UwX5GDCNQEZsRXdgVlNzZ7txpI2jlMvtzbgfoLEGOHjaHpB5QTW/OCrRAMjcx9Zx0HxRliohaxQ==",
"dependencies": {
"@astrojs/mdx": "^3.0.0",
"@astrojs/sitemap": "^3.0.5",
"@astrojs/mdx": "^3.1.0",
"@astrojs/sitemap": "^3.1.5",
"@pagefind/default-ui": "^1.0.3",
"@types/hast": "^3.0.3",
"@types/mdast": "^4.0.3",
"astro-expressive-code": "^0.35.2",
"@types/hast": "^3.0.4",
"@types/mdast": "^4.0.4",
"astro-expressive-code": "^0.35.3",
"bcp-47": "^2.1.0",
"hast-util-from-html": "^2.0.1",
"hast-util-select": "^6.0.2",
"hast-util-to-string": "^3.0.0",
"hastscript": "^8.0.0",
"hastscript": "^9.0.0",
"mdast-util-directive": "^3.0.0",
"mdast-util-to-markdown": "^2.1.0",
"pagefind": "^1.0.3",
@ -368,6 +368,22 @@
"tailwindcss": "^3.3.3"
}
},
"node_modules/@astrojs/starlight/node_modules/hastscript": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.0.tgz",
"integrity": "sha512-jzaLBGavEDKHrc5EfFImKN7nZKKBdSLIdGvCwDZ9TfzbF2ffXiov8CKE445L2Z1Ek2t/m4SKQ2j6Ipv7NyUolw==",
"dependencies": {
"@types/hast": "^3.0.0",
"comma-separated-tokens": "^2.0.0",
"hast-util-parse-selector": "^4.0.0",
"property-information": "^6.0.0",
"space-separated-tokens": "^2.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/@astrojs/tailwind": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/@astrojs/tailwind/-/tailwind-5.1.0.tgz",
@ -400,15 +416,15 @@
}
},
"node_modules/@astrojs/vercel": {
"version": "7.6.0",
"resolved": "https://registry.npmjs.org/@astrojs/vercel/-/vercel-7.6.0.tgz",
"integrity": "sha512-LLOpXWYwTlYgZJCC+ulCpSUnUzOzLrlna2T0WCkhkH1UeavBY5NI0Agpq3rcQd012I7Vr2io+ZKUgKGW+EFvhg==",
"version": "7.7.0",
"resolved": "https://registry.npmjs.org/@astrojs/vercel/-/vercel-7.7.0.tgz",
"integrity": "sha512-VX74OqFDDKH2uYpnbN4FZ5BrJZRzLcbGz2H6JOAIdqm+Q/ZcfFn9WC41QxHVtp1JcwX5QKHeEgbqiCNYnnUt9A==",
"dependencies": {
"@astrojs/internal-helpers": "0.4.0",
"@vercel/analytics": "^1.2.2",
"@vercel/analytics": "^1.3.1",
"@vercel/edge": "^1.1.1",
"@vercel/nft": "^0.26.5",
"esbuild": "^0.21.1",
"@vercel/nft": "^0.27.2",
"esbuild": "^0.21.5",
"fast-glob": "^3.3.2",
"set-cookie-parser": "^2.6.0",
"web-vitals": "^3.5.2"
@ -2126,9 +2142,11 @@
]
},
"node_modules/@shikijs/core": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.3.tgz",
"integrity": "sha512-QnJKHFUW95GnlJLJGP6QLx4M69HM0KlXk+R2Y8lr/x4nAx1Yb/lsuxq4XwybuUjTxbJk+BT0g/kvn0bcsjGGHg=="
"version": "1.6.4",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.4.tgz",
"integrity": "sha512-WTU9rzZae1p2v6LOxMf6LhtmZOkIHYYW160IuahUyJy7YXPPjyWZLR1ag+SgD22ZMxZtz1gfU6Tccc8t0Il/XA=="
},
"node_modules/@sindresorhus/merge-streams": {
"version": "2.3.0",
@ -2290,9 +2308,9 @@
"integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ=="
},
"node_modules/@vercel/analytics": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.2.2.tgz",
"integrity": "sha512-X0rctVWkQV1e5Y300ehVNqpOfSOufo7ieA5PIdna8yX/U7Vjz0GFsGf4qvAhxV02uQ2CVt7GYcrFfddXXK2Y4A==",
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/@vercel/analytics/-/analytics-1.3.1.tgz",
"integrity": "sha512-xhSlYgAuJ6Q4WQGkzYTLmXwhYl39sWjoMA3nHxfkvG+WdBT25c563a7QhwwKivEOZtPJXifYHR1m2ihoisbWyA==",
"dependencies": {
"server-only": "^0.0.1"
},
@ -2315,14 +2333,14 @@
"integrity": "sha512-NtKiIbn9Cq6HWGy+qRudz28mz5nxfOJWls5Pnckjw1yCfSX8rhXdvY/il3Sy3Zd5n/sKCM2h7VSCCpJF/oaDrQ=="
},
"node_modules/@vercel/nft": {
"version": "0.26.5",
"resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.26.5.tgz",
"integrity": "sha512-NHxohEqad6Ra/r4lGknO52uc/GrWILXAMs1BB4401GTqww0fw1bAqzpG1XHuDO+dprg4GvsD9ZLLSsdo78p9hQ==",
"version": "0.27.2",
"resolved": "https://registry.npmjs.org/@vercel/nft/-/nft-0.27.2.tgz",
"integrity": "sha512-7LeioS1yE5hwPpQfD3DdH04tuugKjo5KrJk3yK5kAI3Lh76iSsK/ezoFQfzuT08X3ZASQOd1y9ePjLNI9+TxTQ==",
"dependencies": {
"@mapbox/node-pre-gyp": "^1.0.5",
"@rollup/pluginutils": "^4.0.0",
"acorn": "^8.6.0",
"acorn-import-attributes": "^1.9.2",
"acorn-import-attributes": "^1.9.5",
"async-sema": "^3.1.1",
"bindings": "^1.4.0",
"estree-walker": "2.0.2",
@ -2580,6 +2598,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",
"integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",
"deprecated": "This package is no longer supported.",
"dependencies": {
"delegates": "^1.0.0",
"readable-stream": "^3.6.0"
@ -2624,20 +2643,20 @@
}
},
"node_modules/astro": {
"version": "4.10.1",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.10.1.tgz",
"integrity": "sha512-7bbnUX1CW+12suz0Do8ef1CihqVjDyUW/H/0piNHZyBE3W/VFt5GP5ZxlPzzJLoGtaXif0aXJ4iPurEem2LpdA==",
"version": "4.10.2",
"resolved": "https://registry.npmjs.org/astro/-/astro-4.10.2.tgz",
"integrity": "sha512-SBdkoOanPsxKlKVU4uu/XG0G7NYAFoqmfBtq9SPMJ34B7Hr1MxVdEugERs8IwYN6UaxdDVcqA++9PvH6Onq2cg==",
"dependencies": {
"@astrojs/compiler": "^2.8.0",
"@astrojs/internal-helpers": "0.4.0",
"@astrojs/markdown-remark": "5.1.0",
"@astrojs/telemetry": "3.1.0",
"@babel/core": "^7.24.6",
"@babel/generator": "^7.24.6",
"@babel/parser": "^7.24.6",
"@babel/plugin-transform-react-jsx": "^7.24.6",
"@babel/traverse": "^7.24.6",
"@babel/types": "^7.24.6",
"@babel/core": "^7.24.7",
"@babel/generator": "^7.24.7",
"@babel/parser": "^7.24.7",
"@babel/plugin-transform-react-jsx": "^7.24.7",
"@babel/traverse": "^7.24.7",
"@babel/types": "^7.24.7",
"@types/babel__core": "^7.20.5",
"@types/cookie": "^0.6.0",
"acorn": "^8.11.3",
@ -2650,14 +2669,14 @@
"common-ancestor-path": "^1.0.1",
"cookie": "^0.6.0",
"cssesc": "^3.0.0",
"debug": "^4.3.4",
"debug": "^4.3.5",
"deterministic-object-hash": "^2.0.2",
"devalue": "^5.0.0",
"diff": "^5.2.0",
"dlv": "^1.1.3",
"dset": "^3.1.3",
"es-module-lexer": "^1.5.3",
"esbuild": "^0.21.4",
"esbuild": "^0.21.5",
"estree-walker": "^3.0.3",
"execa": "^8.0.1",
"fast-glob": "^3.3.2",
@ -2679,13 +2698,13 @@
"rehype": "^13.0.1",
"resolve": "^1.22.8",
"semver": "^7.6.2",
"shiki": "^1.6.1",
"shiki": "^1.6.3",
"string-width": "^7.1.0",
"strip-ansi": "^7.1.0",
"tsconfck": "^3.1.0",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.1",
"vite": "^5.2.12",
"vite": "^5.2.13",
"vitefu": "^0.2.5",
"which-pm": "^2.2.0",
"yargs-parser": "^21.1.1",
@ -3415,9 +3434,9 @@
}
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
"dependencies": {
"ms": "2.1.2"
},
@ -3954,6 +3973,7 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",
"integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",
"deprecated": "This package is no longer supported.",
"dependencies": {
"aproba": "^1.0.3 || ^2.0.0",
"color-support": "^1.1.2",
@ -4058,6 +4078,7 @@
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -4599,6 +4620,7 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
"deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.",
"dependencies": {
"once": "^1.3.0",
"wrappy": "1"
@ -6398,6 +6420,7 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",
"integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",
"deprecated": "This package is no longer supported.",
"dependencies": {
"are-we-there-yet": "^2.0.0",
"console-control-strings": "^1.1.0",
@ -7844,6 +7867,7 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"deprecated": "Rimraf versions prior to v4 are no longer supported",
"dependencies": {
"glob": "^7.1.3"
},
@ -8056,11 +8080,12 @@
}
},
"node_modules/shiki": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.3.tgz",
"integrity": "sha512-lE1/YGlzFY0hQSyEfsZj18xGrTWxyhFQkaiILALqTBZPbJeYFWpbUhlmTGPOupYB/qC+H6sV4UznJzcEh3WMHQ==",
"version": "1.6.4",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.4.tgz",
"integrity": "sha512-X88chM7w8jnadoZtjPTi5ahCJx9pc9f8GfEkZAEYUTlcUZIEw2D/RY86HI/LkkE7Nj8TQWkiBfaFTJ3VJT6ESg==",
"dependencies": {
"@shikijs/core": "1.6.3"
"@shikijs/core": "1.6.4"
}
},
"node_modules/signal-exit": {

View file

@ -12,11 +12,11 @@
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/sitemap": "^3.1.5",
"@astrojs/starlight": "^0.23.2",
"@astrojs/starlight": "^0.24.2",
"@astrojs/starlight-tailwind": "^2.0.3",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.6.0",
"astro": "^4.10.1",
"@astrojs/vercel": "^7.7.0",
"astro": "^4.10.2",
"astro-compressor": "^0.4.1",
"globby": "^14.0.1",
"gsap": "^3.12.5",

View file

@ -37,7 +37,7 @@ const secondSubTitle: string =
const pageTitle: string = `Blog | ${SITE.title}`;
---
<MainLayout
<MainLayout lang="fr"
title={pageTitle}
structuredData={{
"@context": "https://schema.org",