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";
|
||||
$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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
BIN
css/fonts/nitrods.woff
Normal file
Binary file not shown.
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: mi post de prueba
|
||||
slug_override: post inaugural
|
||||
layout: post
|
||||
tags: test
|
||||
---
|
||||
|
|
@ -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`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue