Update eleventy to 3.0.0-alpha.4
This commit is contained in:
parent
3909e2fcbe
commit
8f9853f6db
8 changed files with 918 additions and 743 deletions
22
.eleventy.js
22
.eleventy.js
|
|
@ -1,18 +1,18 @@
|
|||
const pluginRss = require('@11ty/eleventy-plugin-rss')
|
||||
const pluginToc = require('eleventy-plugin-nesting-toc')
|
||||
const pluginSyntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
|
||||
import pluginRss from '@11ty/eleventy-plugin-rss'
|
||||
import pluginToc from 'eleventy-plugin-nesting-toc'
|
||||
import pluginSyntaxHighlight from '@11ty/eleventy-plugin-syntaxhighlight'
|
||||
|
||||
// extra features for markdown
|
||||
const markdownIt = require('markdown-it')
|
||||
const abbrs = require('markdown-it-abbr')
|
||||
const anchors = require('markdown-it-anchor')
|
||||
const footnotes = require('markdown-it-footnote')
|
||||
const lazyLoading = require('@junwatu/markdown-it-lazy-loading')
|
||||
import markdownIt from 'markdown-it'
|
||||
import abbrs from 'markdown-it-abbr'
|
||||
import anchors from 'markdown-it-anchor'
|
||||
import footnotes from 'markdown-it-footnote'
|
||||
import lazyLoading from '@junwatu/markdown-it-lazy-loading'
|
||||
|
||||
const { DateTime } = require('luxon')
|
||||
const header = require('./src/_includes/filters/header')
|
||||
import { DateTime } from 'luxon'
|
||||
import header from './src/_includes/filters/header.js'
|
||||
|
||||
module.exports = function (config) {
|
||||
export default function (config) {
|
||||
config.addWatchTarget('./src/posts/drafts/*.md')
|
||||
config.setServerOptions({
|
||||
watch: [
|
||||
|
|
|
|||
11
flake.lock
generated
11
flake.lock
generated
|
|
@ -2,12 +2,11 @@
|
|||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1657367088,
|
||||
"narHash": "sha256-0g3mRN4OGSurVbt+SR7LyVcXsm6jvV0HgxHJDV3t7SI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d8d472305d3570d791182643842c1466fac044b3",
|
||||
"type": "github"
|
||||
"lastModified": 1705856552,
|
||||
"narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
|
||||
"path": "/nix/store/rqdf3gfjq8zh488msnv62h03kkzr308q-source",
|
||||
"rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build:eleventy": "eleventy --input=src/",
|
||||
|
|
@ -17,7 +18,7 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@11ty/eleventy": "^2.0.1",
|
||||
"@11ty/eleventy": "3.0.0-alpha.5",
|
||||
"@11ty/eleventy-fetch": "^4.0.0",
|
||||
"@11ty/eleventy-plugin-rss": "^1.2.0",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^4.2.0",
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
"markdown-it-abbr": "^1.0.4",
|
||||
"markdown-it-anchor": "^8.6.7",
|
||||
"markdown-it-footnote": "^3.0.3",
|
||||
"postcss": "^8.4.33",
|
||||
"postcss": "^8.4.35",
|
||||
"postcss-cli": "^10.1.0",
|
||||
"seedrandom": "^3.0.5"
|
||||
}
|
||||
|
|
|
|||
1604
pnpm-lock.yaml
generated
1604
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,8 +1,6 @@
|
|||
module.exports = config => {
|
||||
return {
|
||||
export default (_) => ({
|
||||
"title": "arnes.space",
|
||||
"baseUrl": "https://arnes.space",
|
||||
"repo": "https://git.arnes.space/arne/arnes.space",
|
||||
"listDrafts": !!process.env.LIST_DRAFTS
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
const crypto = require('crypto')
|
||||
const seedrandom = require('seedrandom')
|
||||
const { serialize } = require('@thi.ng/hiccup')
|
||||
import crypto from 'crypto'
|
||||
import seedrandom from 'seedrandom'
|
||||
import { serialize } from '@thi.ng/hiccup'
|
||||
|
||||
const range = function* (end) {
|
||||
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") }]))]]
|
||||
}
|
||||
|
||||
module.exports = content => serialize(tenPrint(content || ''))
|
||||
export default content => serialize(tenPrint(content || ''))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
const { MB_DATA_URL, LB_DATA_URL, OSM_DATA_URL } = require('process').env
|
||||
const eleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import { env } from 'node:process'
|
||||
import eleventyFetch from '@11ty/eleventy-fetch'
|
||||
|
||||
const { MB_DATA_URL, LB_DATA_URL, OSM_DATA_URL } = env
|
||||
|
||||
const osmChangeSets = async (baseUrl) => {
|
||||
let lastTime = null
|
||||
|
|
@ -18,7 +20,7 @@ const osmChangeSets = async (baseUrl) => {
|
|||
return changesets
|
||||
}
|
||||
|
||||
module.exports = async _config => {
|
||||
export default async (_) => {
|
||||
const [
|
||||
musicBrainz,
|
||||
listenBrainzRaw,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
const { promisify } = require('util')
|
||||
const exec = promisify(require('child_process').exec)
|
||||
import { promisify } from 'node:util'
|
||||
import { exec as _exec } from 'node:child_process'
|
||||
const exec = promisify(_exec)
|
||||
|
||||
const commitFromLog = message => {
|
||||
if (message === '') return {}
|
||||
|
|
@ -19,7 +20,7 @@ const lastCommitFor = async file => {
|
|||
return commitFromLog(stdout)
|
||||
}
|
||||
|
||||
module.exports = async (_) => {
|
||||
export default async (_) => {
|
||||
return {
|
||||
tags: "posts",
|
||||
layout: "posts.njk",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue