Compare commits

...

6 commits

Author SHA1 Message Date
31dc4a5fbe
add nitroDS font 2025-10-18 06:06:07 -03:00
b162b4ed63
remove unused lastfm var 2025-10-18 05:41:35 -03:00
94d5bd7b69
rename test posts to prepare for launch 2025-10-18 05:29:43 -03:00
d9890c51d8
rename posts collection 2025-10-18 05:29:12 -03:00
96e180703b
slugify override and default 2025-10-18 02:56:07 -03:00
8f8d7c317b
replace locale_url 2025-10-18 02:35:16 -03:00
8 changed files with 16 additions and 9 deletions

View file

@ -1,4 +1,5 @@
$ll: "Love LetterTW";
$nds: "NitroDS";
@font-face {
font-family: $ll;
@ -6,3 +7,10 @@ $ll: "Love LetterTW";
font-weight: normal;
src: local($ll), url('/css/fonts/Lovelt__.woff') format('woff');
}
@font-face {
font-family: $nds;
font-style: normal;
font-weight: normal;
src: local($nds), url('/css/fonts/nitrods.woff') format('woff');
}

View file

@ -1,6 +1,5 @@
---
avail_text: "site-lang-avail"
lastfm: true
flight:
img: "/img/Witch-on-broom.gif"
url: "https://www.youtube.com/embed/w1dXpAJ1qfA"
@ -43,7 +42,7 @@ dont_show_lang_in_footer: true
<div class="recent-posts box">
<h2>{{ "recent-posts" | i18n }}</h2>
<ul>
{% for post in collections.post | i18n_filter(5) %}
{% for post in collections.posts | i18n_filter(5) %}
<li><p><a href="{{ post.url }}">{{ post.data.title }}</a><br><span class="date"> {{ post.date.toLocaleString("en-GB", {year: 'numeric', month: '2-digit', day: '2-digit'}) }}</span></p></li>
{% endfor %}
</ul>

View file

@ -1,6 +1,6 @@
---
# TODO: finish post page
tags: post
tags: posts
---
{% extends "_layouts/base.njk" %}
{% block content %}

BIN
css/fonts/nitrods.woff Normal file

Binary file not shown.

View file

@ -14,7 +14,7 @@ title: 404 not found
<h1>{{ "404" | i18n }}</h1>
<img src="/img/404.jpg" alt="{{ "404-alt" | i18n }}">
<div class="fof-foot">
<p><a href={{ "/" | locale_url }}><-- {{ "go-back" | i18n }}</a></p>
<p><a href={{ "/" | locale_url_resolve }}><-- {{ "go-back" | i18n }}</a></p>
<p><a href="https://www.pixiv.net/en/artworks/64483268" target="_blank">moving</a> {{ "404-alt" | i18n }}</p>
</div>
</div>

View file

@ -1,5 +1,6 @@
---
title: mi post de prueba
slug_override: post inaugural
layout: post
tags: test
---

View file

@ -1,8 +1,7 @@
module.exports = {
eleventyComputed: {
// TODO: handle titles as slugs instead of filenames
permalink: (data) => {
// get the file path stem, e.g., "/es/blog/2025/2025-10-18-my-post"
permalink: function (data) {
// get the file path stem
let stem = data.page.filePathStem;
// extract the year from the path
@ -12,14 +11,14 @@ module.exports = {
// check for slug_override first
if (data.slug_override) {
return `/es/blog/${year}/${data.slug_override}/index.html`; // ie /es/blog/2025/post-localizado/index.html
return `/es/blog/${year}/${this.slugify(data.slug_override)}/index.html`;
}
// handle blog posts with date prefix: /es/blog/[year]/[year-month-day]-slug
const blogPostMatch = stem.match(/^\/es\/blog\/(\d{4})\/\d{4}-\d{2}-\d{2}-(.+)$/);
if (blogPostMatch) {
const [, , slug] = blogPostMatch;
return `/es/blog/${year}/${this.slugify(slug)}/index.html`; // ie /es/blog/2025/my-post/index.html
return `/es/blog/${year}/${this.slugify(slug)}/index.html`;
}
}