diff --git a/astro.config.mjs b/astro.config.mjs index 2d7818b..afbde57 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -74,4 +74,11 @@ export default defineConfig({ }, ], }, + i18n: { + defaultLocale: 'en', + locales: ['en', 'es'], + routing: { + prefixDefaultLocale: false, // This means 'en' will not have a prefix, e.g. /about instead of /en/about + } + } }); diff --git a/src/content/jobs/reboot-studio.es.mdx b/src/content/jobs/reboot-studio.es.mdx new file mode 100644 index 0000000..5e49fa1 --- /dev/null +++ b/src/content/jobs/reboot-studio.es.mdx @@ -0,0 +1,10 @@ +--- +title: Título en español: Product Engineer +company: Reboot Studio +location: Mexico City +from: 2022 +to: 2022 # Use 'Now' if the job is still active +url: https://reboot.studio +--- + +

Contenido en español.

diff --git a/src/content/links/bluesky.es.yml b/src/content/links/bluesky.es.yml new file mode 100644 index 0000000..4f8e190 --- /dev/null +++ b/src/content/links/bluesky.es.yml @@ -0,0 +1,3 @@ +label: Etiqueta en español: Bluesky +name: coderdiaz.com +url: https://bsky.app/profile/coderdiaz.com diff --git a/src/content/links/email.es.yml b/src/content/links/email.es.yml new file mode 100644 index 0000000..aac3078 --- /dev/null +++ b/src/content/links/email.es.yml @@ -0,0 +1,3 @@ +label: Etiqueta en español: Email +name: hey@coderdiaz.com +url: mailto:hey@coderdiaz.com diff --git a/src/content/links/github.es.yml b/src/content/links/github.es.yml new file mode 100644 index 0000000..e9b1ddc --- /dev/null +++ b/src/content/links/github.es.yml @@ -0,0 +1,3 @@ +label: Etiqueta en español: GitHub +name: coderdiaz +url: https://github.com/coderdiaz diff --git a/src/content/links/website.es.yml b/src/content/links/website.es.yml new file mode 100644 index 0000000..f6a6499 --- /dev/null +++ b/src/content/links/website.es.yml @@ -0,0 +1,3 @@ +label: Etiqueta en español: Website +name: coderdiaz.com +url: https://coderdiaz.com diff --git a/src/content/pages/homepage/index.es.mdx b/src/content/pages/homepage/index.es.mdx new file mode 100644 index 0000000..bf8c19b --- /dev/null +++ b/src/content/pages/homepage/index.es.mdx @@ -0,0 +1,10 @@ +--- +title: Título en español: Javier Diaz — Software Engineer +seo: + title: Título en español: Javier Diaz — Software Engineer + description: Descripción en español: Hey I'm Javier, a software engineer passionate about interface design and web experiences + type: website + keywords: Palabras clave: keyword, example, demo cv folio +--- + +

Contenido en español.

diff --git a/src/content/posts/example-post/index.es.mdx b/src/content/posts/example-post/index.es.mdx new file mode 100644 index 0000000..76ab958 --- /dev/null +++ b/src/content/posts/example-post/index.es.mdx @@ -0,0 +1,12 @@ +--- +title: Título en español: Example Post +date: 2021-01-01 +image: ./meta.jpg +seo: + title: Título en español: Example Post with Code + description: Descripción en español: Demo example for write posts + type: article + keywords: Palabras clave: blog code, example shiki +--- + +

Contenido en español.

diff --git a/src/content/talks/ccoss.es.mdx b/src/content/talks/ccoss.es.mdx new file mode 100644 index 0000000..046c82e --- /dev/null +++ b/src/content/talks/ccoss.es.mdx @@ -0,0 +1,9 @@ +--- +title: Título en español: Start with open-source +year: 2021 +event: CCOSS +location: Mexico City +url: https://www.youtube.com/watch?v=I8kUR9Zwr6s +--- + +

Contenido en español.

diff --git a/src/pages/writing/[...slug].astro b/src/pages/writing/[...slug].astro index 8d2ec19..ef2f3f2 100644 --- a/src/pages/writing/[...slug].astro +++ b/src/pages/writing/[...slug].astro @@ -5,6 +5,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro'; import { DEFAULT_CONFIGURATION } from '@/lib/constants'; import { Image } from 'astro:assets'; import { getCollection, render } from 'astro:content'; +import { getRelativeLocaleUrl } from 'astro:i18n'; export async function getStaticPaths() { const entries = await getCollection('posts'); @@ -23,7 +24,7 @@ const { Content } = await render(entry);