Compare commits
6 commits
32feffab2a
...
31dc4a5fbe
| Author | SHA1 | Date | |
|---|---|---|---|
| 31dc4a5fbe | |||
| b162b4ed63 | |||
| 94d5bd7b69 | |||
| d9890c51d8 | |||
| 96e180703b | |||
| 8f8d7c317b |
8 changed files with 16 additions and 9 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
$ll: "Love LetterTW";
|
$ll: "Love LetterTW";
|
||||||
|
$nds: "NitroDS";
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: $ll;
|
font-family: $ll;
|
||||||
|
|
@ -6,3 +7,10 @@ $ll: "Love LetterTW";
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
src: local($ll), url('/css/fonts/Lovelt__.woff') format('woff');
|
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');
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
avail_text: "site-lang-avail"
|
avail_text: "site-lang-avail"
|
||||||
lastfm: true
|
|
||||||
flight:
|
flight:
|
||||||
img: "/img/Witch-on-broom.gif"
|
img: "/img/Witch-on-broom.gif"
|
||||||
url: "https://www.youtube.com/embed/w1dXpAJ1qfA"
|
url: "https://www.youtube.com/embed/w1dXpAJ1qfA"
|
||||||
|
|
@ -43,7 +42,7 @@ dont_show_lang_in_footer: true
|
||||||
<div class="recent-posts box">
|
<div class="recent-posts box">
|
||||||
<h2>{{ "recent-posts" | i18n }}</h2>
|
<h2>{{ "recent-posts" | i18n }}</h2>
|
||||||
<ul>
|
<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>
|
<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 %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
# TODO: finish post page
|
# TODO: finish post page
|
||||||
tags: post
|
tags: posts
|
||||||
---
|
---
|
||||||
{% extends "_layouts/base.njk" %}
|
{% extends "_layouts/base.njk" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
|
||||||
BIN
css/fonts/nitrods.woff
Normal file
BIN
css/fonts/nitrods.woff
Normal file
Binary file not shown.
|
|
@ -14,7 +14,7 @@ title: 404 not found
|
||||||
<h1>{{ "404" | i18n }}</h1>
|
<h1>{{ "404" | i18n }}</h1>
|
||||||
<img src="/img/404.jpg" alt="{{ "404-alt" | i18n }}">
|
<img src="/img/404.jpg" alt="{{ "404-alt" | i18n }}">
|
||||||
<div class="fof-foot">
|
<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>
|
<p><a href="https://www.pixiv.net/en/artworks/64483268" target="_blank">moving</a> {{ "404-alt" | i18n }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
title: mi post de prueba
|
title: mi post de prueba
|
||||||
|
slug_override: post inaugural
|
||||||
layout: post
|
layout: post
|
||||||
tags: test
|
tags: test
|
||||||
---
|
---
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
eleventyComputed: {
|
eleventyComputed: {
|
||||||
// TODO: handle titles as slugs instead of filenames
|
permalink: function (data) {
|
||||||
permalink: (data) => {
|
// get the file path stem
|
||||||
// get the file path stem, e.g., "/es/blog/2025/2025-10-18-my-post"
|
|
||||||
let stem = data.page.filePathStem;
|
let stem = data.page.filePathStem;
|
||||||
|
|
||||||
// extract the year from the path
|
// extract the year from the path
|
||||||
|
|
@ -12,14 +11,14 @@ module.exports = {
|
||||||
|
|
||||||
// check for slug_override first
|
// check for slug_override first
|
||||||
if (data.slug_override) {
|
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
|
// 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}-(.+)$/);
|
const blogPostMatch = stem.match(/^\/es\/blog\/(\d{4})\/\d{4}-\d{2}-\d{2}-(.+)$/);
|
||||||
if (blogPostMatch) {
|
if (blogPostMatch) {
|
||||||
const [, , slug] = 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`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue