diff --git a/config/filters/index.js b/config/filters/index.js
index e9cdf921..139ad0b6 100644
--- a/config/filters/index.js
+++ b/config/filters/index.js
@@ -91,20 +91,7 @@ export default {
},
// links
- findPost: (url, posts) => {
- if (!url || !posts || !posts[url]?.toots?.[0]?.includes('https')) return null;
- const BASE_URL = 'https://social.lol/users/cory/statuses/'
- const STATUS_URL = 'https://social.lol/@cory/'
- return posts[url]?.toots?.[0]?.replace(BASE_URL, STATUS_URL) || null;
- },
- absoluteUrl: (url) => {
- try {
- return (new URL(url, BASE_URL)).toString()
- } catch(e) {
- console.error('Error generating absoluteUrl.')
- }
- return url;
- },
+ absoluteUrl: (url) => (new URL(url, BASE_URL)).toString(),
// feeds
normalizeEntries: (entries) => {
diff --git a/package-lock.json b/package-lock.json
index 665dfa00..67352f77 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,18 +1,17 @@
{
"name": "coryd.dev",
- "version": "18.8.9",
+ "version": "18.8.10",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
- "version": "18.8.9",
+ "version": "18.8.10",
"license": "MIT",
"dependencies": {
"@cdransf/api-text": "^1.4.0",
"@cdransf/select-pagination": "^1.3.1",
"@cdransf/theme-toggle": "^1.3.2",
- "@daviddarnes/mastodon-post": "^1.3.0",
"minisearch": "^6.3.0",
"youtube-video-element": "^1.1.5"
},
@@ -288,12 +287,6 @@
"integrity": "sha512-xjsqvMT9Ee2+IDGeLSG31I0yh2Ebd4QqRfPEVn/VLk7BPB44ONj5f600z2Lor7WHfOmRg7L/bWvwWpPmgUAZ4w==",
"license": "MIT"
},
- "node_modules/@daviddarnes/mastodon-post": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@daviddarnes/mastodon-post/-/mastodon-post-1.3.0.tgz",
- "integrity": "sha512-6AMQ/tl6uI3wXknv8exYJguym/bPHxIW5XOYg7aWCQtMbP4XUDAsWp2pv4o9wtesIF8K7CssNPR93qFOh7D8lw==",
- "license": "MIT"
- },
"node_modules/@jridgewell/gen-mapping": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz",
@@ -539,9 +532,9 @@
"peer": true
},
"node_modules/@types/node": {
- "version": "20.14.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.0.tgz",
- "integrity": "sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA==",
+ "version": "20.14.1",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.1.tgz",
+ "integrity": "sha512-T2MzSGEu+ysB/FkWfqmhV3PLyQlowdptmmgD20C6QxsS8Fmv5SjpZ1ayXaEC0S21/h5UJ9iA6W/5vSNU5l00OA==",
"dev": true,
"license": "MIT",
"dependencies": {
diff --git a/package.json b/package.json
index e2a1f5b9..bc31c761 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "coryd.dev",
- "version": "18.8.10",
+ "version": "18.9.10",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {
@@ -22,7 +22,6 @@
"@cdransf/api-text": "^1.4.0",
"@cdransf/select-pagination": "^1.3.1",
"@cdransf/theme-toggle": "^1.3.2",
- "@daviddarnes/mastodon-post": "^1.3.0",
"minisearch": "^6.3.0",
"youtube-video-element": "^1.1.5"
},
diff --git a/src/_data/music.js b/src/_data/music.js
index ae7176ae..092126f8 100644
--- a/src/_data/music.js
+++ b/src/_data/music.js
@@ -33,32 +33,6 @@ const fetchDataForPeriod = async (startPeriod, fields, table) => {
return rows
}
-const fetchAllTimeData = async (fields, table) => {
- const PAGE_SIZE = 1000
- let rows = []
- let rangeStart = 0
-
- while (true) {
- const { data, error } = await supabase
- .from(table)
- .select(fields)
- .order('listened_at', { ascending: false })
- .range(rangeStart, rangeStart + PAGE_SIZE - 1)
-
- if (error) {
- console.error(error)
- break
- }
-
- rows = rows.concat(data)
-
- if (data.length < PAGE_SIZE) break
- rangeStart += PAGE_SIZE
- }
-
- return rows
-}
-
const fetchGenreMapping = async () => {
const { data, error } = await supabase
.from('genres')
@@ -162,16 +136,6 @@ export default async function() {
}
}
- // Fetch and aggregate all-time data
- const allTimeData = await fetchAllTimeData(selectFields, 'listens')
- results['allTime'] = {
- artists: aggregateData(allTimeData, 'artist_name', 'artists'),
- albums: aggregateData(allTimeData, 'album_name', 'albums'),
- tracks: aggregateData(allTimeData, 'track_name', 'track'),
- genres: aggregateGenres(allTimeData),
- totalTracks: allTimeData?.length?.toLocaleString('en-US')
- }
-
const recentData = await fetchDataForPeriod(DateTime.now().minus({ days: 7 }), selectFields, 'listens')
results['recent'] = {
diff --git a/src/_includes/partials/widgets/mastodon-post.liquid b/src/_includes/partials/widgets/mastodon-post.liquid
deleted file mode 100644
index aae7761a..00000000
--- a/src/_includes/partials/widgets/mastodon-post.liquid
+++ /dev/null
@@ -1,24 +0,0 @@
-{%- assign shareLink = postUrl | findPost:linkPosts -%}
-{%- if shareLink %}
-
-
-
-
-
I've listened to {{ music.allTime.albums.size }} albums and most of what I listen to is {{ music.allTime.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.
-See my artists or tracks for this period.
-I've listened to {{ music.allTime.artists.size }} artists and most of what I listen to is {{ music.allTime.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.
-See my albums or tracks for this period.
-More: This week • This month • 3 months • All time
+More: This week • This month • 3 months
More: This week • This month • 3 months • All time
+More: This week • This month • 3 months
More: This week • This month • 3 months • All time
+More: This week • This month • 3 months
{% render "partials/media/music/releases.liquid", albumReleases:albumReleases %} \ No newline at end of file diff --git a/src/pages/main/music/tracks/all-time.html b/src/pages/main/music/tracks/all-time.html deleted file mode 100644 index 47e3b667..00000000 --- a/src/pages/main/music/tracks/all-time.html +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Artists • all time -description: All of the tracks I've listened to. -layout: default -pagination: - data: music.allTime.tracks - size: 50 -permalink: "/music/tracks/all-time/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html" -schema: music ---- -{% tablericon "arrow-left" "Go back" %} Go back -{% if pagination.pageNumber == 0 %} -I've listened to {{ music.allTime.totalTracks }} tracks and most of what I've listened to has been {{ music.allTime.genres | listToString: "genre", 5 }}.
-See my artists or albums for this period.
-