Compare commits

..

No commits in common. "9ccd29294b6d90c8f9beec9d737cde2f62cf5efa" and "f6da7ab9978e8976cc986346a062b3266a2c0b71" have entirely different histories.

14 changed files with 313 additions and 534 deletions

3
.gitignore vendored
View file

@ -1,9 +1,8 @@
_site/ _site/
node_modules node_modules/
.cache .cache
patches patches
tools/in/* tools/in/*
!tools/in/.gitkeep !tools/in/.gitkeep
tools/out/* tools/out/*
!tools/out/.gitkeep !tools/out/.gitkeep
tina

View file

@ -3,7 +3,7 @@ layout: layouts/base.njk
--- ---
{% css %} {% css %}
h2 ~ h2 { h2 {
border: none; border: none;
padding-top: 20px; padding-top: 20px;
border-top: 12px double var(--xkcd-magenta); border-top: 12px double var(--xkcd-magenta);

View file

@ -3,12 +3,12 @@
"permalink": "/blog/feed.xml", "permalink": "/blog/feed.xml",
"eleventyExcludeFromCollections": true, "eleventyExcludeFromCollections": true,
"metadata": { "metadata": {
"title": "nycki.net", "title": "My Blog about Boats",
"description": "nycki.net", "description": "I am writing about my experiences as a naval navel-gazer.",
"language": "en", "language": "en",
"base": "https://nycki.net/", "base": "https://example.com/",
"author": { "author": {
"name": "nycki" "name": "Boaty McBoatFace"
} }
} }
} }

View file

@ -2,7 +2,6 @@
layout: layouts/base.njk layout: layouts/base.njk
title: characters title: characters
permalink: /characters/ permalink: /characters/
description: toons? games?
--- ---
# {{ title }} # {{ title }}
@ -12,21 +11,21 @@ description: toons? games?
## the list ## the list
**sona⭐ roleplay🎭 no custom art♻ cards project🃏 removable head🎃** **fursona🤎 roleplay🎭 no custom art♻ cards project🃏 removable head🎃**
- [Magenta Johnson](https://www.f-list.net/c/magenta%20johnson/) (2013) 🎭🎃 - [Magenta Johnson](https://www.f-list.net/c/magenta%20johnson/) (2013) 🤎🎭🎃
- [Naughty Stage Ninjas](https://www.f-list.net/c/naughty%20stage%20ninjas/) (2015) 🎭♻️ - [Naughty Stage Ninjas](https://www.f-list.net/c/naughty%20stage%20ninjas/) (2015) 🎭♻️
- [Paradox Pickpocket](https://www.f-list.net/c/Paradox%20Pickpocket) (2016) 🎭♻️ - [Paradox Pickpocket](https://www.f-list.net/c/Paradox%20Pickpocket) (2016) 🎭♻️
- [Magic Hands](https://www.f-list.net/c/magic%20hands/) (2016) 🎭 - [Magic Hands](https://www.f-list.net/c/magic%20hands/) (2016) 🎭
- [Lucky](https://www.f-list.net/c/lucky%20bunny%20girl/) (2016) 🎭♻️ - [Lucky](https://www.f-list.net/c/lucky%20bunny%20girl/) (2016) 🎭♻️
- The Bunnies: - The Bunnies:
- [Klayni](https://www.f-list.net/c/klayni/) (2020) 🎭 - [Klayni](https://www.f-list.net/c/klayni/) (2020) 🤎🎭
- [Seven Spades](https://www.f-list.net/c/seven%20spades/) and [Ten Diamonds](https://www.f-list.net/c/ten%20diamonds/), the Velvets (2022) 🃏 - [Seven Spades](https://www.f-list.net/c/seven%20spades/) and [Ten Diamonds](https://www.f-list.net/c/ten%20diamonds/), the Velvets (2022) 🃏
- Kitty and [Bunny](https://www.f-list.net/c/bunny%20card/), Fortune's Court (2022) 🃏 - Kitty and [Bunny](https://www.f-list.net/c/bunny%20card/), Fortune's Court (2022) 🃏
- [Unnamed Bunny Assistants](https://x.com/nupa_nsfw/status/1692229330091590004) (2023) 🃏 - [Unnamed Bunny Assistants](https://x.com/nupa_nsfw/status/1692229330091590004) (2023) 🃏
- [Royal Fluffle](https://cohost.org/nycki/post/7477310-bunny-cards) (2024) 🃏 - [Royal Fluffle](https://cohost.org/nycki/post/7477310-bunny-cards) (2024) 🃏
- [Klay Mu](https://bark.lgbt/@nycki/113261905651460029) (2023) 🎭 - [Klay Mu](https://bark.lgbt/@nycki/113261905651460029) (2023) 🤎🎭
- [Fusion Magenta](https://bark.lgbt/@nycki/111557553537372550) (2023) - [Fusion Magenta](https://bark.lgbt/@nycki/111557553537372550) (2023) 🤎
- [Gogo Board](https://bark.lgbt/@nycki/113154698667052076) (2023) 🎭🎃 - [Gogo Board](https://bark.lgbt/@nycki/113154698667052076) (2023) 🎭🎃
- [Venus Nil](https://bark.lgbt/@nycki/113318574242645093) (2024) 🎭🎃 - [Venus Nil](https://bark.lgbt/@nycki/113318574242645093) (2024) 🎭🎃

View file

@ -195,7 +195,7 @@ a[href].header-anchor:focus,
color: #aaa; color: #aaa;
} }
h1 { h1:not(:has(+h2)) {
padding-bottom: 20px; padding-bottom: 20px;
border-bottom: 12px double var(--xkcd-magenta); border-bottom: 12px double var(--xkcd-magenta);
} }

View file

@ -6,8 +6,6 @@ import { DateTime } from "luxon";
/** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */ /** @param {import('@11ty/eleventy').UserConfig} eleventyConfig */
export default function(eleventyConfig) { export default function(eleventyConfig) {
eleventyConfig.setInputDirectory('content');
if (process.env.NODE_ENV === 'localhost') { if (process.env.NODE_ENV === 'localhost') {
console.log('metadata override'); console.log('metadata override');
eleventyConfig.addGlobalData('metadata.url', 'http://localhost:8080'); eleventyConfig.addGlobalData('metadata.url', 'http://localhost:8080');
@ -33,9 +31,7 @@ export default function(eleventyConfig) {
eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}"); eleventyConfig.addWatchTarget("content/**/*.{svg,webp,png,jpeg}");
// Official plugins // Official plugins
eleventyConfig.addBundle('css', { eleventyConfig.addBundle('css');
toFileDirectory: 'bundle',
});
eleventyConfig.addPlugin(pluginSyntaxHighlight, { eleventyConfig.addPlugin(pluginSyntaxHighlight, {
preAttributes: { tabindex: 0 } preAttributes: { tabindex: 0 }
}); });
@ -154,6 +150,14 @@ export default function(eleventyConfig) {
// Pre-process *.html files with: (default: `liquid`) // Pre-process *.html files with: (default: `liquid`)
htmlTemplateEngine: "njk", htmlTemplateEngine: "njk",
// These are all optional:
dir: {
input: "content", // default: "."
includes: "../_includes", // default: "_includes"
data: "../_data", // default: "_data"
output: "_site"
},
// ----------------------------------------------------------------- // -----------------------------------------------------------------
// Optional items: // Optional items:
// ----------------------------------------------------------------- // -----------------------------------------------------------------

752
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -33,14 +33,13 @@
"url": "https://github.com/11ty/eleventy-base-blog/issues" "url": "https://github.com/11ty/eleventy-base-blog/issues"
}, },
"homepage": "https://github.com/11ty/eleventy-base-blog#readme", "homepage": "https://github.com/11ty/eleventy-base-blog#readme",
"dependencies": { "devDependencies": {
"@11ty/eleventy": "^3.0.0", "@11ty/eleventy": "^3.0.0",
"@11ty/eleventy-plugin-rss": "^2.0.2", "@11ty/eleventy-plugin-rss": "^2.0.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"jsdom": "^25.0.1", "jsdom": "^25.0.1",
"luxon": "^3.3.0", "luxon": "^3.3.0",
"markdown-it-anchor": "^8.6.7", "markdown-it-anchor": "^8.6.7"
"sharp": "^0.33.5"
} }
} }

View file

@ -1,36 +1,28 @@
import fs from 'node:fs/promises'; // winget install ImageMagick.Q8
import path from 'node:path'; const { exec } = require('node:child_process');
import sharp from 'sharp'; const { readdir } = require('node:fs/promises');
const path = require('node:path');
const dirIn = 'tools/in';
const dirOut = 'tools/out';
const thresholdBytes = 2 * 1024 * 1024;
const quality = [100, 99, 97, 95, 90, 80, 75, 70, 60, 50, 40];
async function main() { async function main() {
for (const base of await fs.readdir(dirIn)) { const dirIn = 'tools/in';
const dirOut = 'tools/out';
for (const base of await readdir(dirIn)) {
if (base === '.gitkeep') continue; if (base === '.gitkeep') continue;
const fileIn = `${dirIn}/${base}`; const fileIn = `${dirIn}/${base}`;
const { name } = path.parse(fileIn); const file = path.parse(fileIn);
const { size } = await fs.stat(fileIn); const fileOut = `${dirOut}/${file.name}.webp`;
if (size <= thresholdBytes) {
const fileOut = `${dirOut}/${base}`; // TODO: what if the input image is already a lossless webp?
console.log(`${fileIn} -> ${fileOut} (no changes)`); const lossless = file.ext === '.png';
fs.copyFile(fileIn, fileOut);
continue; const command = [
} `magick "${fileIn}"`,
const fileOut = `${dirOut}/${name}.jpg`; `-define webp:lossless=${lossless}`,
for (let i = 0; i < quality.length; i += 1) { `-define webp:target-size=200kb`,
const newStats = await (sharp(fileIn) `"${fileOut}"`,
.withMetadata() ].join(' ');
.jpeg({ mozjpeg: true, quality: quality[i] }) console.log(command);
.toFile(fileOut) exec(command, (_err, stdout, stderr) => console.log(stdout + stderr));
);
if (i == quality.length || newStats.size <= thresholdBytes) {
console.log(`${fileIn} -> ${fileOut} (quality: ${quality[i]})`);
break;
}
}
} }
} }