diff --git a/config/collections/index.js b/config/collections/index.js index 8445e13c..62a79c3a 100644 --- a/config/collections/index.js +++ b/config/collections/index.js @@ -65,7 +65,7 @@ export const processContent = (collection) => { } } - const movieData = movies['watchHistory'].filter((movie) => movie['rating']) + const movieData = movies['movies'].filter((movie) => movie['rating']) const bookData = books.all.filter((book) => book['rating']) const addItemToIndex = (items, icon, getUrl, getTitle, getTags) => { @@ -135,14 +135,14 @@ export const processContent = (collection) => { addContent(posts, '📝', (item) => item['title'], (item) => item['date']) addContent(links, '🔗', (item) => item['title'], (item) => item['date']) addContent(books.all.filter((book) => book['status'] === 'finished'), '📖', (item) => `${item['title']}${item['rating'] ? ' (' + item['rating'] + ')' : ''}`, (item) => item['date']) - addContent(movies['watchHistory'], '🎥', (item) => `${item['title']}${item['rating'] ? ' (' + item['rating'] + ')' : ''}`, (item) => item['lastWatched']) + addContent(movies['movies'], '🎥', (item) => `${item['title']}${item['rating'] ? ' (' + item['rating'] + ')' : ''}`, (item) => item['lastWatched']) addContent(concerts, '🎤', (item) => `${item['artistNameString'] ? item['artistNameString'] : item['artist']['name']} at ${item['venue']['name'].split(',')[0].trim()}`, (item) => item['date']) addSiteMapContent(posts, (item) => item.title, (item) => item.date) addSiteMapContent(pages, (item) => item.title, (item) => item.date) addSiteMapContent(artists, (item) => item.name, (item) => item.date) addSiteMapContent(genres, (item) => item.name, (item) => item.date) - addSiteMapContent(movies['watchHistory'], (item) => item.title, (item) => item.date) + addSiteMapContent(movies['movies'], (item) => item.title, (item) => item.date) addSiteMapContent(books.all, (item) => item.title, (item) => item.date) addSiteMapContent(tv?.['shows'], (item) => item.title, (item) => item.date) diff --git a/package-lock.json b/package-lock.json index 1877d051..d07162c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "24.1.1", + "version": "24.1.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "24.1.1", + "version": "24.1.2", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index a9cb86e9..ed766646 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "24.1.1", + "version": "24.1.2", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/data/books.js b/src/data/books.js index e4109d29..a2f5a767 100644 --- a/src/data/books.js +++ b/src/data/books.js @@ -123,6 +123,6 @@ const sortBooksByYear = (books) => { export default async function () { const books = await fetchAllBooks() - const processedBooks = processBooks(books).filter(book => book['status'] !== 'want to read') + const processedBooks = processBooks(books) return { all: processedBooks, years: sortBooksByYear(processedBooks) } } \ No newline at end of file diff --git a/src/data/movies.js b/src/data/movies.js index dcc4acd5..628267e2 100644 --- a/src/data/movies.js +++ b/src/data/movies.js @@ -116,6 +116,7 @@ export default async function () { const recentlyWatchedMovies = filterMovies(movie => movie['lastWatched'] && year - DateTime.fromISO(movie['lastWatched']).year <= 3).sort((a, b) => new Date(b['lastWatched']) - new Date(a['lastWatched'])) return { + movies: formatMovieData(processedMovies), watchHistory: formatMovieData(filterMovies(movie => movie['lastWatched'])), recentlyWatched: formatMovieData(recentlyWatchedMovies), favorites: formatMovieData(favoriteMovies).sort((a, b) => a['title'].localeCompare(b['title'])), @@ -123,6 +124,7 @@ export default async function () { } catch (error) { console.error('Error fetching and processing movies data:', error) return { + movies: [], watchHistory: [], recentlyWatched: [], favorites: [], diff --git a/src/pages/dynamic/watching/movie.html b/src/pages/dynamic/watching/movie.html index c0008133..56534ebd 100644 --- a/src/pages/dynamic/watching/movie.html +++ b/src/pages/dynamic/watching/movie.html @@ -1,7 +1,7 @@ --- layout: default pagination: - data: movies.watchHistory + data: movies.movies size: 1 alias: movie permalink: "{{ movie.url }}/index.html" @@ -57,7 +57,7 @@ schema: movie