restructure website for i18n

This commit is contained in:
yuki 2025-10-14 03:00:47 -03:00
parent df47f4d57b
commit 13746921dd
Signed by: yuki
GPG key ID: 0C98E6FF04EC3915
10 changed files with 51 additions and 5 deletions

View file

@ -1 +1 @@
<p>{% for button in 88x31.buttons.misc.splice(0, 3) %}<img src="/img/buttons/{{ button.image }}.gif" alt="{{ button.alt }}">{% endfor %}<br>est. 2025 | yuki &#169; <a href="LICENSE.txt">Do What the Fuck You Want to Public License</a> </p>
<p>{% for button in 88x31.buttons.misc.slice(0, 3) %}<img src="/img/buttons/{{ button.image }}.gif" alt="{{ button.alt }}">{% endfor %}<br>est. 2025 | yuki &#169; <a href="LICENSE.txt">Do What the Fuck You Want to Public License</a> </p>

View file

@ -1,9 +1,8 @@
---
lastfm: false
navbar: "default_navbar.njk"
---
<!DOCTYPE html>
<html>
<html lang="{{ lang }}">
<head>
{% include "base_head.njk" %}
</head>
@ -20,7 +19,7 @@ navbar: "default_navbar.njk"
</div>-->
</div>
{% include navbar %}
{% include "default_navbar.njk" %}
</div>
<div class="base-content-wrapper">

View file

@ -9,7 +9,7 @@ lastfm: true
<div class="leftside-fake-ad"></div>
-->
<div class="buttons-wrapper box">
<h2>please visit...</h3>
<h2>please visit...</h2>
<div class="buttons">
{% for button in 88x31.buttons.people.slice(0, 5) %}
<a href="{{ button.link }}" target="_blank" title="{{ button.name }}">

View file

@ -4,6 +4,7 @@ const {EleventyI18nPlugin} = require('@11ty/eleventy');
module.exports = function(eleventyConfig) {
eleventyConfig.setLayoutsDirectory("_layouts");
eleventyConfig.addPassthroughCopy("img");
eleventyConfig.addPassthroughCopy("css/fonts");
eleventyConfig.addPassthroughCopy("js");

19
en/en.11tydata.js Normal file
View file

@ -0,0 +1,19 @@
module.exports = {
lang: "en",
permalink: data => {
// `data.page.filePathStem` is the input path without extension, starting with a leading slash
// e.g. "/en/index" or "/en/blog/test-post"
const stem = data.page.filePathStem;
if (stem === "/en/index") {
// For /en/index.md → /index.html
return "/index.html";
}
if (stem.startsWith("/en/")) {
// For /en/anything-else.md (including subfolders), remove only the first /en
// e.g. /en/blog/test-post → /en/blog/test-post/index.html
return `${stem.replace(/^\/en/, "")}/index.html`;
}
// fallback: default 11ty behavior
return data.page.outputPath;
}
};

14
es/blog/test-post.md Normal file
View file

@ -0,0 +1,14 @@
---
title: mi post de prueba
layout: post
tags: test
---
# esperad
este es un puto teeest
---
jej
## esperad
no nada no dije nada

8
es/es.11tydata.js Normal file
View file

@ -0,0 +1,8 @@
module.exports = {
lang: 'es',
permalink: function (data) {
if (data.slug_override) {
return `/${data.lang}/${this.slugify(data.slug_override)}/`;
}
}
};

5
es/index.md Normal file
View file

@ -0,0 +1,5 @@
---
layout: home
---
# oye...
bienvenido a mi sitio!! aun no lo termino pero revisa lo que tenga hecho <3