Update eleventy to 3.0.0-alpha.4

This commit is contained in:
arne 2024-02-16 15:30:57 +01:00
commit 8f9853f6db
8 changed files with 918 additions and 743 deletions

View file

@ -1,18 +1,18 @@
const pluginRss = require('@11ty/eleventy-plugin-rss') import pluginRss from '@11ty/eleventy-plugin-rss'
const pluginToc = require('eleventy-plugin-nesting-toc') import pluginToc from 'eleventy-plugin-nesting-toc'
const pluginSyntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight') import pluginSyntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight'
// extra features for markdown // extra features for markdown
const markdownIt = require('markdown-it') import markdownIt from 'markdown-it'
const abbrs = require('markdown-it-abbr') import abbrs from 'markdown-it-abbr'
const anchors = require('markdown-it-anchor') import anchors from 'markdown-it-anchor'
const footnotes = require('markdown-it-footnote') import footnotes from 'markdown-it-footnote'
const lazyLoading = require('@junwatu/markdown-it-lazy-loading') import lazyLoading from '@junwatu/markdown-it-lazy-loading'
const { DateTime } = require('luxon') import { DateTime } from 'luxon'
const header = require('./src/_includes/filters/header') import header from './src/_includes/filters/header.js'
module.exports = function (config) { export default function (config) {
config.addWatchTarget('./src/posts/drafts/*.md') config.addWatchTarget('./src/posts/drafts/*.md')
config.setServerOptions({ config.setServerOptions({
watch: [ watch: [

11
flake.lock generated
View file

@ -2,12 +2,11 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1657367088, "lastModified": 1705856552,
"narHash": "sha256-0g3mRN4OGSurVbt+SR7LyVcXsm6jvV0HgxHJDV3t7SI=", "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
"owner": "NixOS", "path": "/nix/store/rqdf3gfjq8zh488msnv62h03kkzr308q-source",
"repo": "nixpkgs", "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
"rev": "d8d472305d3570d791182643842c1466fac044b3", "type": "path"
"type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",

View file

@ -3,6 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"type": "module",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build:eleventy": "eleventy --input=src/", "build:eleventy": "eleventy --input=src/",
@ -17,7 +18,7 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@11ty/eleventy": "^2.0.1", "@11ty/eleventy": "3.0.0-alpha.5",
"@11ty/eleventy-fetch": "^4.0.0", "@11ty/eleventy-fetch": "^4.0.0",
"@11ty/eleventy-plugin-rss": "^1.2.0", "@11ty/eleventy-plugin-rss": "^1.2.0",
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0", "@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
@ -31,7 +32,7 @@
"markdown-it-abbr": "^1.0.4", "markdown-it-abbr": "^1.0.4",
"markdown-it-anchor": "^8.6.7", "markdown-it-anchor": "^8.6.7",
"markdown-it-footnote": "^3.0.3", "markdown-it-footnote": "^3.0.3",
"postcss": "^8.4.33", "postcss": "^8.4.35",
"postcss-cli": "^10.1.0", "postcss-cli": "^10.1.0",
"seedrandom": "^3.0.5" "seedrandom": "^3.0.5"
} }

1604
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,8 +1,6 @@
module.exports = config => { export default (_) => ({
return { "title": "arnes.space",
"title": "arnes.space", "baseUrl": "https://arnes.space",
"baseUrl": "https://arnes.space", "repo": "https://git.arnes.space/arne/arnes.space",
"repo": "https://git.arnes.space/arne/arnes.space", "listDrafts": !!process.env.LIST_DRAFTS
"listDrafts": !!process.env.LIST_DRAFTS })
}
}

View file

@ -1,6 +1,6 @@
const crypto = require('crypto') import crypto from 'crypto'
const seedrandom = require('seedrandom') import seedrandom from 'seedrandom'
const { serialize } = require('@thi.ng/hiccup') import { serialize } from '@thi.ng/hiccup'
const range = function* (end) { const range = function* (end) {
for (let i = 0; i < end; i++) { for (let i = 0; i < end; i++) {
@ -76,4 +76,4 @@ const tenPrint = content => {
["use", {x, y, "class": "arc", "href": (random() < 0.5 ? "#arc-b" : "#arc-a") }]))]] ["use", {x, y, "class": "arc", "href": (random() < 0.5 ? "#arc-b" : "#arc-a") }]))]]
} }
module.exports = content => serialize(tenPrint(content || '')) export default content => serialize(tenPrint(content || ''))

View file

@ -1,5 +1,7 @@
const { MB_DATA_URL, LB_DATA_URL, OSM_DATA_URL } = require('process').env import { env } from 'node:process'
const eleventyFetch = require('@11ty/eleventy-fetch') import eleventyFetch from '@11ty/eleventy-fetch'
const { MB_DATA_URL, LB_DATA_URL, OSM_DATA_URL } = env
const osmChangeSets = async (baseUrl) => { const osmChangeSets = async (baseUrl) => {
let lastTime = null let lastTime = null
@ -18,7 +20,7 @@ const osmChangeSets = async (baseUrl) => {
return changesets return changesets
} }
module.exports = async _config => { export default async (_) => {
const [ const [
musicBrainz, musicBrainz,
listenBrainzRaw, listenBrainzRaw,

View file

@ -1,5 +1,6 @@
const { promisify } = require('util') import { promisify } from 'node:util'
const exec = promisify(require('child_process').exec) import { exec as _exec } from 'node:child_process'
const exec = promisify(_exec)
const commitFromLog = message => { const commitFromLog = message => {
if (message === '') return {} if (message === '') return {}
@ -19,7 +20,7 @@ const lastCommitFor = async file => {
return commitFromLog(stdout) return commitFromLog(stdout)
} }
module.exports = async (_) => { export default async (_) => {
return { return {
tags: "posts", tags: "posts",
layout: "posts.njk", layout: "posts.njk",