feat: upgrade to 11ty 3.0.0@alpha
This commit is contained in:
parent
2cd8e4a380
commit
e16633653a
43 changed files with 578 additions and 5039 deletions
|
@ -1,8 +1,8 @@
|
|||
const { AssetCache } = require('@11ty/eleventy-fetch')
|
||||
const ics = require('ics-to-json-extended')
|
||||
const { DateTime } = require('luxon')
|
||||
import { AssetCache } from '@11ty/eleventy-fetch'
|
||||
import ics from 'ics-to-json-extended'
|
||||
import { DateTime } from 'luxon'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const URL = process.env.SECRET_FEED_ALBUM_RELEASES
|
||||
const icsToJson = ics.default
|
||||
const asset = new AssetCache('album_release_data')
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
const ALBUM_DENYLIST = ['no-love-deep-web', 'unremittance']
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const MUSIC_KEY = process.env.API_KEY_LASTFM
|
||||
const url = `https://ws.audioscrobbler.com/2.0/?method=user.gettopalbums&user=coryd_&api_key=${MUSIC_KEY}&limit=8&format=json&period=7day`
|
||||
const res = EleventyFetch(url, {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const API_KEY_PLAUSIBLE = process.env.API_KEY_PLAUSIBLE
|
||||
const url =
|
||||
'https://plausible.io/api/v1/stats/breakdown?site_id=coryd.dev&period=6mo&property=event:page&limit=30'
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
const mbidPatches = require('./json/mbid-patches.json')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
import mbidPatches from './json/mbid-patches.js'
|
||||
|
||||
const mbidMap = (artist) => {
|
||||
return mbidPatches[artist.toLowerCase()] || ''
|
||||
}
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const MUSIC_KEY = process.env.API_KEY_LASTFM
|
||||
const url = `https://ws.audioscrobbler.com/2.0/?method=user.gettopartists&user=coryd_&api_key=${MUSIC_KEY}&limit=8&format=json&period=7day`
|
||||
const res = EleventyFetch(url, {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
const jsdom = require('jsdom')
|
||||
const { AssetCache } = require('@11ty/eleventy-fetch')
|
||||
import jsdom from 'jsdom'
|
||||
import { AssetCache } from '@11ty/eleventy-fetch'
|
||||
|
||||
const { JSDOM } = jsdom
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const COOKIE = process.env.COOKIE_STORYGRAPH
|
||||
const url = 'https://app.thestorygraph.com/currently-reading/coryd'
|
||||
const asset = new AssetCache('books_data')
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module.exports = async function () {
|
||||
export default async function () {
|
||||
return process.env.NODE_ENV
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const { ActivityFeed } = await import('@11ty/eleventy-activity-feed')
|
||||
const feed = new ActivityFeed()
|
||||
feed.addSource('rss', '📝', 'https://coryd.dev/feeds/posts')
|
||||
|
|
21
src/_data/json/mbid-patches.js
Normal file
21
src/_data/json/mbid-patches.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
export default {
|
||||
adramelech: '259e6968-a841-4fc5-b02b-54665b85977b',
|
||||
afi: '1c3919b2-43ca-4a4a-935d-9d50135ec0ef',
|
||||
'carnal tomb': 'e24534dc-d29e-4e0b-84fa-26d487b0790a',
|
||||
'carpe noctem': 'aa349181-1cb9-4340-bb3f-82eefba3e697',
|
||||
cruciamentum: '9a783663-db0c-4237-a3a9-afe72d055ddc',
|
||||
'edge of sanity': '82d1972f-f815-480d-ba78-9873b799bdd1',
|
||||
envy: '8c4519da-59e7-44b5-868d-350dffb30b51',
|
||||
fumes: 'a5139ca1-f4f3-4bea-ae4c-ae4e2efd857d',
|
||||
ghastly: '70f969df-7fc1-421e-afad-678c0bbd1aea',
|
||||
'home is where': '76ead0bf-51e0-43c8-ae8f-59caefdd84a2',
|
||||
krallice: 'b4e4b359-76a3-447e-be1d-80a24887134e',
|
||||
nucleus: '9eefaa74-8dea-41af-8bb3-0d9616bec16f',
|
||||
oasis: '39ab1aed-75e0-4140-bd47-540276886b60',
|
||||
obliteration: '5c241a91-d7e9-447a-807c-e4a8435f10ef',
|
||||
osees: '194272cc-dcc8-4640-a4a6-66da7d250d5c',
|
||||
panopticon: 'd9b1f00a-31a7-4f64-9f29-8481e7be8911',
|
||||
'pigment vehicle': 'c421f86c-991c-4b2d-9058-516375903deb',
|
||||
'regional justice center': '64ad5550-e93f-4add-80c3-e6b651f4f250',
|
||||
worm: '6313658e-cd68-4c81-9778-17ce3825748e',
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"adramelech": "259e6968-a841-4fc5-b02b-54665b85977b",
|
||||
"afi": "1c3919b2-43ca-4a4a-935d-9d50135ec0ef",
|
||||
"carnal tomb": "e24534dc-d29e-4e0b-84fa-26d487b0790a",
|
||||
"carpe noctem": "aa349181-1cb9-4340-bb3f-82eefba3e697",
|
||||
"cruciamentum": "9a783663-db0c-4237-a3a9-afe72d055ddc",
|
||||
"edge of sanity": "82d1972f-f815-480d-ba78-9873b799bdd1",
|
||||
"envy": "8c4519da-59e7-44b5-868d-350dffb30b51",
|
||||
"fumes": "a5139ca1-f4f3-4bea-ae4c-ae4e2efd857d",
|
||||
"ghastly": "70f969df-7fc1-421e-afad-678c0bbd1aea",
|
||||
"home is where": "76ead0bf-51e0-43c8-ae8f-59caefdd84a2",
|
||||
"krallice": "b4e4b359-76a3-447e-be1d-80a24887134e",
|
||||
"nucleus": "9eefaa74-8dea-41af-8bb3-0d9616bec16f",
|
||||
"oasis": "39ab1aed-75e0-4140-bd47-540276886b60",
|
||||
"obliteration": "5c241a91-d7e9-447a-807c-e4a8435f10ef",
|
||||
"osees": "194272cc-dcc8-4640-a4a6-66da7d250d5c",
|
||||
"panopticon": "d9b1f00a-31a7-4f64-9f29-8481e7be8911",
|
||||
"pigment vehicle": "c421f86c-991c-4b2d-9058-516375903deb",
|
||||
"regional justice center": "64ad5550-e93f-4add-80c3-e6b651f4f250",
|
||||
"worm": "6313658e-cd68-4c81-9778-17ce3825748e"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const API_TOKEN_READWISE = process.env.API_TOKEN_READWISE
|
||||
const url = 'https://readwise.io/api/v3/list?location=archive'
|
||||
const res = EleventyFetch(url, {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const mbidPatches = require('./json/mbid-patches.json')
|
||||
import mbidPatches from './json/mbid-patches.js'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
return mbidPatches
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
export default {
|
||||
siteName: 'Cory Dransfeldt',
|
||||
siteDescription:
|
||||
"I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies.",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const TV_KEY = process.env.API_KEY_TRAKT
|
||||
const MOVIEDB_KEY = process.env.API_KEY_MOVIEDB
|
||||
const url = 'https://api.trakt.tv/users/cdransf/history/movies?page=1&limit=6&extended=full'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = async function () {
|
||||
export default async function () {
|
||||
return {
|
||||
footer: [
|
||||
{ name: 'Uses' },
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const url = 'https://api.omg.lol/address/cory/statuses/'
|
||||
const res = EleventyFetch(url, {
|
||||
duration: '1h',
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
const mbidPatches = require('./json/mbid-patches.json')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
import mbidPatches from './json/mbid-patches.js'
|
||||
|
||||
const mbidMap = (artist) => {
|
||||
return mbidPatches[artist.toLowerCase()] || ''
|
||||
}
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const MUSIC_KEY = process.env.API_KEY_LASTFM
|
||||
const LISTENBRAINZ_TOKEN = process.env.LISTENBRAINZ_TOKEN
|
||||
const url = `https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=coryd_&api_key=${MUSIC_KEY}&format=json&limit=200`
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const TV_KEY = process.env.API_KEY_TRAKT
|
||||
const MOVIEDB_KEY = process.env.API_KEY_MOVIEDB
|
||||
const url = 'https://api.trakt.tv/users/cdransf/history/shows?page=1&limit=36'
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||
import EleventyFetch from '@11ty/eleventy-fetch'
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
const KEY_CORYD = process.env.API_KEY_WEBMENTIONS_CORYD_DEV
|
||||
const url = `https://webmention.io/api/mentions.jf2?token=${KEY_CORYD}&per-page=1000`
|
||||
const res = EleventyFetch(url, {
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
import { createRequire } from 'module'
|
||||
|
||||
const require = createRequire(import.meta.url)
|
||||
const chartData = require('./json/weekly-artist-charts.json')
|
||||
const charts = chartData['charts']
|
||||
|
||||
module.exports = async function () {
|
||||
export default async function () {
|
||||
return charts.map((chart) => {
|
||||
const artists = chart['weeklyartistchart']['artist'].splice(0, 8)
|
||||
const date = parseInt(chart['weeklyartistchart']['@attr']['to']) * 1000
|
||||
let content = 'My top artists for the week: '
|
||||
artists.forEach((artist, index) => {
|
||||
const artistName = artist['name'].replace('&', 'and');
|
||||
const artistName = artist['name'].replace('&', 'and')
|
||||
content += `${artistName} @ ${artist['playcount']} play${
|
||||
parseInt(artist['playcount']) > 1 ? 's' : ''
|
||||
}`
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{%- capture fullUrl %}
|
||||
{{ meta.url }}{{ page.url }}{% endcapture -%}
|
||||
{%- capture fullUrl %}{{ meta.url }}{{ page.url }}{% endcapture -%}
|
||||
<!doctype html>
|
||||
<html class="scrollbar-thin scrollbar-thumb-blue-600 dark:scrollbar-thumb-blue-400 scrollbar-track-blue-100" lang="en">
|
||||
<head>
|
||||
|
@ -23,14 +22,14 @@
|
|||
<meta name="generator" content="{{ eleventy.generator }}">
|
||||
<meta name="robots" content="noai, noimageai">
|
||||
<link
|
||||
href="/assets/icons/favicon.ico?v={% version %}"
|
||||
href="/assets/icons/favicon.ico?v={% assetHash %}"
|
||||
rel="icon"
|
||||
sizes="any">
|
||||
<link
|
||||
href="/assets/icons/favicon.svg?v={% version %}"
|
||||
href="/assets/icons/favicon.svg?v={% assetHash %}"
|
||||
rel="icon"
|
||||
type="image/svg+xml">
|
||||
<link href="/assets/icons/apple-touch-icon.png?v={% version %}" rel="apple-touch-icon">
|
||||
<link href="/assets/icons/apple-touch-icon.png?v={% assetHash %}" rel="apple-touch-icon">
|
||||
{% capture css %}
|
||||
{% render "../assets/styles/prism.css" %}
|
||||
{% render "../assets/styles/tailwind.css" %}
|
||||
|
|
Reference in a new issue