From 045e8c21e23dd3e4cc6a46aa054637780ea8adee Mon Sep 17 00:00:00 2001 From: Miguel Puerta Date: Mon, 30 Oct 2023 19:48:22 +0100 Subject: [PATCH] feat: adds translations --- content/_index.es.md | 8 ++++ content/_index.md | 3 ++ content/posts/finally-a-blog/index.es.md | 9 ++++ .../index.md} | 2 + hugo.toml | 42 +++++++++++++------ .../hello-friend/layouts/_default/index.html | 8 ++-- 6 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 content/_index.es.md create mode 100644 content/posts/finally-a-blog/index.es.md rename content/posts/{finally-a-blog.md => finally-a-blog/index.md} (77%) diff --git a/content/_index.es.md b/content/_index.es.md new file mode 100644 index 0000000..3c2b464 --- /dev/null +++ b/content/_index.es.md @@ -0,0 +1,8 @@ ++++ +framed = true ++++ +# Hola! Soy migtarx! + +¡Bienvenido a mi blog! Aquí compartiré mis experiencias como desarrollador de software profesional y algunas como administrador de sistemas en mi tiempo libre. + +A lo largo de este espacio, compartiré mis desafíos y descubrimientos en el mundo tecnológico, combinando mi pasión por el desarrollo de software con un interés en la administración de sistemas y algunas otras cosas en el mundo de la tecnología en general. Espero que encuentres valor en las experiencias que comparto aquí. diff --git a/content/_index.md b/content/_index.md index 7cb2b0f..f2cc3fa 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,3 +1,6 @@ ++++ +framed = true ++++ # Hey! I'm migtarx! diff --git a/content/posts/finally-a-blog/index.es.md b/content/posts/finally-a-blog/index.es.md new file mode 100644 index 0000000..e8f3024 --- /dev/null +++ b/content/posts/finally-a-blog/index.es.md @@ -0,0 +1,9 @@ ++++ +title = 'Finalmente un Blog' +date = 2023-10-29T22:56:33+01:00 +author = "migtarx" +slug = "finally-a-blog" +translationKey = "i18n-finally-a-blog" +description = "¡Finalmente una forma de compartir mis experiencias y también documentar todos mis procesos! ¡Esto parece prometedor!" +draft = true ++++ diff --git a/content/posts/finally-a-blog.md b/content/posts/finally-a-blog/index.md similarity index 77% rename from content/posts/finally-a-blog.md rename to content/posts/finally-a-blog/index.md index 5f1bf04..677296f 100644 --- a/content/posts/finally-a-blog.md +++ b/content/posts/finally-a-blog/index.md @@ -2,6 +2,8 @@ title = 'Finally a Blog' date = 2023-10-29T22:56:33+01:00 author = "migtarx" +slug = "finally-a-blog" +translationKey = "i18n-finally-a-blog" description = "Finally a way to share my experiences and also to document all my processes! This looks promising!" draft = true +++ \ No newline at end of file diff --git a/hugo.toml b/hugo.toml index 979383f..7778e2b 100644 --- a/hugo.toml +++ b/hugo.toml @@ -22,8 +22,34 @@ publishDir = "src/public" # Show full page content in RSS feed items #(default is Description or Summary metadata in the front matter) rssFullText = true - +defaultContentLanguage = "en" [languages] + [languages.es] + title = "El blog de migtarx" + subtitle = "Las aventuras del friko tecnologico" + keywords = "" + copyright = "" + menuMore = "Mostrar mas" + writtenBy = "Escritor por" + readMore = "Leer mas" + readOtherPosts = "Leer otros articulos" + newerPosts = "Articulos nuevos" + olderPosts = "Articulos anteriores" + minuteReadingTime = "tiempo de lectura" + dateFormatSingle = "02/01/2006" + dateFormatList = "02/01/2006" + [languages.es.params.logo] + logoText = "migtarx" + logoHomeLink = "/" + [languages.es.menu] + [[languages.es.menu.main]] + identifier = "about" + name = "About" + url = "/about" + [[languages.es.menu.main]] + identifier = "enlang" + name = "EN" + url = "/" [languages.en] title = "migtarx blog" subtitle = "the adventures of a tech guy" @@ -38,23 +64,15 @@ publishDir = "src/public" minuteReadingTime = "min read" dateFormatSingle = "2006-01-02" dateFormatList = "2006-01-02" - # leave empty to disable, enter display text to enable - # lastModDisplay = "" - [languages.en.params.logo] logoText = "migtarx" logoHomeLink = "/" - # or - # - # path = "/img/your-example-logo.svg" - # alt = "Your example logo alt text" - [languages.en.menu] [[languages.en.menu.main]] identifier = "about" name = "About" url = "/about" [[languages.en.menu.main]] - identifier = "showcase" - name = "Showcase" - url = "/showcase" + identifier = "eslang" + name = "ES" + url = "/es" diff --git a/themes/hello-friend/layouts/_default/index.html b/themes/hello-friend/layouts/_default/index.html index f866562..558cceb 100644 --- a/themes/hello-friend/layouts/_default/index.html +++ b/themes/hello-friend/layouts/_default/index.html @@ -9,10 +9,10 @@ {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} {{ if .Content }} -
- {{ .Content }} -
- {{ end }} +
+ {{ .Content }} +
+{{ end }}
{{ range $paginator.Pages }}