{%- assign fullUrl = globals.url | append: page.url -%} {%- assign pageTitle = globals.site_name -%} {%- if schema == 'blog' -%} {%- assign pageTitle = post.title -%} {%- elsif title -%} {%- assign pageTitle = title | append: ' / ' | append: globals.site_name -%} {%- elsif artist.name -%} {%- assign pageTitle = 'Artists / ' | append: artist.name | append: ' / ' | append: globals.site_name -%} {%- elsif schema == 'music-index' -%} {%- assign pageTitle = 'Music / ' | append: globals.site_name -%} {%- elsif schema == 'music-period' -%} {%- assign pageTitle = 'Music / ' | append: page.title | append: globals.site_name -%} {%- elsif genre.name -%} {%- assign pageTitle = 'Music / ' | append: genre.name | append: ' / ' | append: globals.site_name -%} {%- elsif book.title -%} {%- assign pageTitle = 'Books / ' | append: book.title | append: ' / ' | append: globals.site_name -%} {%- elsif year.value -%} {%- assign pageTitle = ' / Books ' | prepend: year.value | append: ' / ' | append: globals.site_name -%} {%- elsif movie.title -%} {%- assign pageTitle = 'Movies / ' | append: movie.title -%} {%- if movie.rating -%} {%- assign pageTitle = pageTitle | append: ' (' | append: movie.rating | append: ')' -%} {%- endif -%} {%- assign pageTitle = pageTitle | append: ' / ' | append: globals.site_name -%} {%- elsif show.title -%} {%- assign pageTitle = 'Shows / ' | append: show.title | append: ' / ' | append: globals.site_name -%} {%- elsif page.description -%} {%- assign pageTitle = page.title | append: ' / ' | append: globals.site_name -%} {%- endif -%} {%- assign pageDescription = globals.site_description -%} {%- if schema == 'blog' -%} {%- assign pageDescription = post.description | markdown | strip_html -%} {%- elsif artist.description -%} {%- assign pageDescription = artist.description | truncatewords: 50 -%} {%- elsif book.description -%} {%- assign pageDescription = book.review | markdown | strip_html | default: book.description | truncatewords: 50 -%} {%- elsif movie.description -%} {%- assign pageDescription = movie.review | markdown | strip_html | default: movie.description | truncatewords: 50 -%} {%- elsif show.description -%} {%- assign pageDescription = show.review | markdown | strip_html | default: show.description | truncatewords: 50 -%} {%- elsif genre.description -%} {%- assign pageDescription = genre.description | markdown | strip_html | truncatewords: 50 -%} {%- elsif page.description -%} {%- assign pageDescription = page.description -%} {%- elsif description -%} {%- assign pageDescription = description -%} {%- endif -%} {%- assign ogImage = 'https://cdn.coryd.dev/' | append: globals.opengraph_default -%} {%- case schema -%} {%- when 'music' -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: page.image -%} {%- when 'music-index' -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: music.week.artists[0].image -%} {%- when 'artist' -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: artist.image -%} {%- when 'genre' -%} {%- assign sortedGenreArtists = genre.artists | sortByPlaysDescending: "total_plays" -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: sortedGenreArtists[0].image -%} {%- when 'watching' -%} {%- assign featuredMovie = movies.recentlyWatched | first -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredMovie.backdrop -%} {%- when 'books' -%} {%- assign featuredBook = books.all | bookStatus: 'started' | reverse | first -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%} {%- when 'books-year' -%} {%- assign featuredBook = books.all | bookStatus: 'finished' | bookFinishedYear: year.value | bookSortDescending | first -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%} {%- when 'book' -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: book.image -%} {%- when 'movie' -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: movie.backdrop -%} {%- when 'show' -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: show.backdrop -%} {%- when 'genre' -%} {%- assign genreArtist = genre.artists | shuffleArray | first -%} {%- assign ogImage = 'https://cdn.coryd.dev' | append: genreArtist.image -%} {%- endcase -%} {{ pageTitle }} {{ content }}