chore: don't generate unwatched/unread pages

This commit is contained in:
Cory Dransfeldt 2024-08-25 12:12:55 -07:00
parent 98b6399c89
commit 5376095860
No known key found for this signature in database
8 changed files with 13 additions and 11 deletions

View file

@ -65,7 +65,7 @@ export const processContent = (collection) => {
}
}
const movieData = movies['movies'].filter((movie) => movie['rating'])
const movieData = movies['watchHistory'].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['movies'], '🎥', (item) => `${item['title']}${item['rating'] ? ' (' + item['rating'] + ')' : ''}`, (item) => item['lastWatched'])
addContent(movies['watchHistory'], '🎥', (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['movies'], (item) => item.title, (item) => item.date)
addSiteMapContent(movies['watchHistory'], (item) => item.title, (item) => item.date)
addSiteMapContent(books.all, (item) => item.title, (item) => item.date)
addSiteMapContent(tv?.['shows'], (item) => item.title, (item) => item.date)

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "coryd.dev",
"version": "24.0.1",
"version": "24.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
"version": "24.0.1",
"version": "24.0.2",
"license": "MIT",
"dependencies": {
"@cdransf/api-text": "^1.5.0",

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "24.0.1",
"version": "24.0.3",
"description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module",
"scripts": {

View file

@ -13,7 +13,7 @@
position: absolute;
z-index: 1;
content: '';
box-shadow: inset 0 -120px 80px -60px var(--background-color);
box-shadow: inset 0 -120px 60px -60px var(--background-color);
width: 100%;
height: 20%;
bottom: 0;

View file

@ -77,6 +77,10 @@
}
}
p.concerts + ul + hr {
display: none;
}
@media screen and (min-width: 768px) {
.artist-focus {
& img {

View file

@ -115,6 +115,6 @@ const sortBooksByYear = (books) => {
export default async function () {
const books = await fetchAllBooks()
const processedBooks = processBooks(books)
const processedBooks = processBooks(books).filter(book => book['status'] !== 'want to read')
return { all: processedBooks, years: sortBooksByYear(processedBooks) }
}

View file

@ -114,7 +114,6 @@ 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,7 +122,6 @@ export default async function () {
} catch (error) {
console.error('Error fetching and processing movies data:', error)
return {
movies: [],
watchHistory: [],
recentlyWatched: [],
favorites: [],

View file

@ -1,7 +1,7 @@
---
layout: default
pagination:
data: movies.movies
data: movies.watchHistory
size: 1
alias: movie
permalink: "{{ movie.url }}/index.html"