Translated post to Spanish (#21)

* fix video url

* update deploy script for using rsync

* remove delete from script

* translate resources page

* fix images dimensions and favicon

* add css optimization plugin and improve images

* update project dependencies

* refactor lang

* post translated to spanish

* fix metadata

* update dependencies
This commit is contained in:
Juan Manzanero 2024-11-09 10:54:34 -06:00 committed by GitHub
parent 4dadd988f4
commit 9363bf7a20
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 1523 additions and 1872 deletions

View File

@ -11,39 +11,38 @@
},
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/mdx": "^3.1.2",
"@astrojs/react": "^3.6.0",
"@astrojs/rss": "^4.0.7",
"@astrojs/sitemap": "^3.1.6",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.7.2",
"@astrojs/mdx": "^3.1.9",
"@astrojs/react": "^3.6.2",
"@astrojs/rss": "^4.0.9",
"@astrojs/sitemap": "^3.2.1",
"@astrojs/tailwind": "^5.1.2",
"@playform/inline": "^0.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@tailwindcss/typography": "^0.5.13",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"astro": "^4.11.3",
"@tailwindcss/typography": "^0.5.15",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"astro": "^4.16.10",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"fast-glob": "^3.3.2",
"lucide-react": "^0.396.0",
"markdown-it": "^14.1.0",
"marked": "^13.0.1",
"marked": "^13.0.3",
"node-html-parser": "^6.1.13",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"rehype-pretty-code": "^0.13.2",
"rehype-slug": "^6.0.0",
"sanitize-html": "^2.13.0",
"sharp": "^0.33.4",
"tailwind-merge": "^2.3.0",
"tailwindcss": "^3.4.4",
"sanitize-html": "^2.13.1",
"sharp": "^0.33.5",
"tailwind-merge": "^2.5.4",
"tailwindcss": "^3.4.14",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.5.2"
"typescript": "^5.6.3"
},
"devDependencies": {
"@types/markdown-it": "^14.1.1",
"@types/sanitize-html": "^2.11.0",
"pocketbase": "^0.21.3"
"@types/markdown-it": "^14.1.2",
"@types/sanitize-html": "^2.13.0",
"pocketbase": "^0.21.5"
}
}

3301
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
import { Code, RssIcon } from "lucide-react";
import { Button } from "@/components/ui/button";
import formatDate from "@/utils/format-date";
import type { lang } from "@/i18n/utils";
const locales = {
en: {
@ -16,7 +17,7 @@ const locales = {
};
type Props = {
lang: "en" | "es";
lang: lang;
};
export default function Footer({ lang }: Props) {

View File

@ -3,9 +3,10 @@ import logo from "@/assets/logo.png";
import { Image } from "astro:assets";
import LinkButton from "@/components/link-button";
import { ChevronUp, Compass } from "lucide-react";
import type { lang } from "@/i18n/utils";
type Props = {
lang: "en" | "es";
lang: lang;
};
const locales = {

View File

@ -8,7 +8,7 @@ import {
Info,
Mail,
} from "lucide-react";
import { useTranslations } from "@/i18n/utils";
import { useTranslations, type lang } from "@/i18n/utils";
type TNavItem = {
type: string;
@ -44,7 +44,7 @@ export const navItems: TNavItem[] = [
];
type Props = {
lang: "en" | "es";
lang: lang;
};
export default function Navigation(props: Props) {

View File

@ -16,7 +16,7 @@ So yeah, I proved this tool for building static websites, as Vercel has been tak
That, and I realized that I just need a full static website, no need of SSR even for the Microblog page, as I don't post daily, I can just redeploy the website, so the last post is rendered.
## Static HTML is the way to go
## Static is the way to go
At the start of the Internet, websites were just plain HTML, CSS and JS, no need of Single Page Application, Server Side Rendering, etc.

View File

@ -0,0 +1,43 @@
---
title: Website migrado a Astro
description: Migré este website a Astro, de tal forma para probarlo, me terminó gustando.
tags: [Astro]
image: /portfolio/website-migrated-to-astro/banner.png
imageCaption: Next Intl Blog Template banner
date: 2024-6-26
author: Juan Manzanero
rss: true
---
![Banner mostrando el tech stack](@/assets/portfolio/website-migrated-to-astro/banner.png)
_Tech stack usado. Astro, React, TailwindCSS, MDX_
Migré este website a Astro, de tal forma para probarlo, me terminó gustando.
Probé esta herramienta para construir website estáticos, ya que Vercel ha estado tomando decisiones raras sobre la dirección del desarrollo de Next.js.
Eso, y que me di cuenta que solo necesito un static website, no necesito de SSR incluso para la página del Microblog, ya que no posteo diario, puedo simplemente redeployar mi website, así el último post es renderizado.
## Static es el camino a seguir
Al inicio del Internet, los website eran simples archivos planos de HTML, CSS y JS, no había necesidad de Single Page Application, Server Side Rendering, etc.
Por supuesto, hay muchos websites que necesitan estas estrategias de rendering, pero para un website como este, solo static es mejor.
Menos tiempo buildeando, carga rápida, hosting barato, menos JavaScript en el browser.
## Lo genial sobre Astro
Puedes usar cualquier component de cualquier framework.
Puedes usar components de React, Angular, Vue, Svelete en el mismo proyecto, ya que Astro los compila como HTML/CSS/JS.
No solo eso, pero puedes usar Astro como si fuera Next.js, con la estrategia de *hybrid* rendering, puedes especificar que páginas quieres que sean Server Side Rendered. Obviamente, si vas por este camino, debes hostear tu proyecto en un server.
### En otras cosas...
Estoy planeando en hacer videos para YouTube, hablando de temas que considero necesitamos en la comunidad hispana, temas como cyberSecurity, privacidad, el actual estado de la tecnología, y más.
Hay muchos canales de YT en Inglés hanlando cobre eso, así que es por eso que pienso hacerlo en Español.
Aún así necesito mejorar los banners de estos posts...

View File

@ -1,5 +1,7 @@
import { ui, defaultLang, showDefaultLang } from "@/i18n/ui";
export type lang = "en" | "es";
export function getLangFromUrl(url: URL) {
const [, lang] = url.pathname.split("/");
if (lang in ui) return lang as keyof typeof ui;