restructure website for i18n
This commit is contained in:
parent
df47f4d57b
commit
13746921dd
10 changed files with 51 additions and 5 deletions
|
|
@ -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 © <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 © <a href="LICENSE.txt">Do What the Fuck You Want to Public License</a> </p>
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
---
|
---
|
||||||
lastfm: false
|
lastfm: false
|
||||||
navbar: "default_navbar.njk"
|
|
||||||
---
|
---
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="{{ lang }}">
|
||||||
<head>
|
<head>
|
||||||
{% include "base_head.njk" %}
|
{% include "base_head.njk" %}
|
||||||
</head>
|
</head>
|
||||||
|
|
@ -20,7 +19,7 @@ navbar: "default_navbar.njk"
|
||||||
</div>-->
|
</div>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include navbar %}
|
{% include "default_navbar.njk" %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="base-content-wrapper">
|
<div class="base-content-wrapper">
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ lastfm: true
|
||||||
<div class="leftside-fake-ad"></div>
|
<div class="leftside-fake-ad"></div>
|
||||||
-->
|
-->
|
||||||
<div class="buttons-wrapper box">
|
<div class="buttons-wrapper box">
|
||||||
<h2>please visit...</h3>
|
<h2>please visit...</h2>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
{% for button in 88x31.buttons.people.slice(0, 5) %}
|
{% for button in 88x31.buttons.people.slice(0, 5) %}
|
||||||
<a href="{{ button.link }}" target="_blank" title="{{ button.name }}">
|
<a href="{{ button.link }}" target="_blank" title="{{ button.name }}">
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const {EleventyI18nPlugin} = require('@11ty/eleventy');
|
||||||
|
|
||||||
module.exports = function(eleventyConfig) {
|
module.exports = function(eleventyConfig) {
|
||||||
eleventyConfig.setLayoutsDirectory("_layouts");
|
eleventyConfig.setLayoutsDirectory("_layouts");
|
||||||
|
|
||||||
eleventyConfig.addPassthroughCopy("img");
|
eleventyConfig.addPassthroughCopy("img");
|
||||||
eleventyConfig.addPassthroughCopy("css/fonts");
|
eleventyConfig.addPassthroughCopy("css/fonts");
|
||||||
eleventyConfig.addPassthroughCopy("js");
|
eleventyConfig.addPassthroughCopy("js");
|
||||||
|
|
|
||||||
19
en/en.11tydata.js
Normal file
19
en/en.11tydata.js
Normal 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
14
es/blog/test-post.md
Normal 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
8
es/es.11tydata.js
Normal 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
5
es/index.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
layout: home
|
||||||
|
---
|
||||||
|
# oye...
|
||||||
|
bienvenido a mi sitio!! aun no lo termino pero revisa lo que tenga hecho <3
|
||||||
Loading…
Add table
Reference in a new issue