chore: filter to query

This commit is contained in:
Cory Dransfeldt 2024-10-13 15:20:54 -07:00
parent ed65bb8127
commit ffea333d55
No known key found for this signature in database
22 changed files with 24 additions and 73 deletions

View file

@ -56,8 +56,7 @@
{%- when 'artist' -%}
{%- assign ogImage = globals.cdn_url | append: artist.grid.image -%}
{%- when 'genre' -%}
{%- assign sortedGenreArtists = genre.artists | sortByPlaysDescending: "total_plays" -%}
{%- assign ogImage = globals.cdn_url | append: sortedGenreArtists[0].grid.image -%}
{%- assign ogImage = globals.cdn_url | append: genre.artists[0].grid.image -%}
{%- when 'watching' -%}
{%- assign featuredMovie = movies.recentlyWatched | first -%}
{%- assign ogImage = globals.cdn_url | append: featuredMovie.grid.backdrop -%}
@ -98,8 +97,8 @@
<link rel="stylesheet" href="/assets/styles/index.css?v={% appVersion %}" type="text/css" />
<link rel="canonical" href="{{ fullUrl }}" />
<meta property="og:title" content="{{ pageTitle }}" />
<meta name="description" content="{{ pageDescription | sanitizeHtml }}" />
<meta property="og:description" content="{{ pageDescription | sanitizeHtml }}" />
<meta name="description" content="{{ pageDescription }}" />
<meta property="og:description" content="{{ pageDescription }}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ fullUrl }}" />
<meta property="og:image" content="{{ ogImage }}?class=w800" />

View file

@ -2,7 +2,7 @@
"version": "https://jsonfeed.org/version/1",
"title": "{{ title }}",
"home_page_url": "{{ globals.url }}",
"feed_url": "{{ permalink | absoluteUrl }}",
"feed_url": "{{ globals.url }}{{ permalink }}",
"description": "{{ globals.site_description }}",
"icon": "{{ globals.cdn_url }}{{ globals.avatar }}?class=w200",
"author": {

View file

@ -2,15 +2,15 @@
<?xml-stylesheet href="/assets/styles/feed.xsl" type="text/xsl" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{{ permalink | absoluteUrl }}" rel="self" type="application/rss+xml" />
<atom:link href="{{ globals.url }}{{ permalink }}" rel="self" type="application/rss+xml" />
{%- assign entries = data -%}
<title><![CDATA[{{ title }}]]></title>
<description><![CDATA[{{ globals.site_description }}]]></description>
<link>{{ permalink | absoluteUrl }}</link>
<link>{{ globals.url }}{{ permalink }}</link>
<lastBuildDate>{{ 'now' | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>
<image>
<title><![CDATA[{{ title }}]]></title>
<link>{{ permalink | absoluteUrl }}</link>
<link>{{ globals.url }}{{ permalink }}</link>
<url>{{ globals.cdn_url }}{{ globals.avatar }}?class=w200</url>
<width>144</width>
<height>144</height>

View file

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="{{ permalink | absoluteUrl }}" rel="self" type="application/rss+xml" />
<atom:link href="{{ globals.url }}{{ permalink }}" rel="self" type="application/rss+xml" />
{%- assign entries = data -%}
<title><![CDATA[{{ title }}]]></title>
<description><![CDATA[{{ globals.site_description }}]]></description>
<link>{{ permalink | absoluteUrl }}</link>
<link>{{ globals.url }}{{ permalink }}</link>
{% assign firstEntry = entries | first %}
<lastBuildDate>{{ 'now' | date: "%a, %d %b %Y %H:%M:%S %z" }}</lastBuildDate>
<image>
<title><![CDATA[{{ title }}]]></title>
<link>{{ permalink | absoluteUrl }}</link>
<link>{{ globals.url }}{{ permalink }}</link>
<url>{{ globals.cdn_url }}{{ globals.avatar }}?class=w200</url>
<width>144</width>
<height>144</height>

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/artists/three-months/">artists</a> or <a href="/music/tracks/three-months/">tracks</a> I've listened to over the last 3 months. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/this-month">this month</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/artists/this-month/">artists</a> or <a href="/music/tracks/this-month/">tracks</a> I've listened to this month. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/artists/this-week/">artists</a> or <a href="/music/tracks/this-week/">tracks</a> I've listened to this week. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music/this-month">this month</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/albums/three-months/">albums</a> or <a href="/music/tracks/three-months/">tracks</a> I've listened to over the last 3 months. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/this-month">this month</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/albums/this-month/">albums</a> or <a href="/music/tracks/this-month/">tracks</a> I've listened to this month. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/albums/this-week/">albums</a> or <a href="/music/tracks/this-week/">tracks</a> I've listened to this week. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music/this-month">this month</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -16,7 +16,7 @@ schema: genre
artist is
{% endif %}
{%- endcapture -%}
{%- assign mediaLinks = genre.artists | sortByPlaysDescending: "total_plays" | mediaLinks: "artist", 5 -%}
{%- assign mediaLinks = genre.artists | mediaLinks: "artist", 5 -%}
<noscript><style>[data-toggle-content].text-toggle-hidden {height: unset !important;overflow: unset !important;margin-bottom: unset !important;}[data-toggle-content].text-toggle-hidden::after {display: none !important;}</style></noscript>
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
<h2>{{ genre.name }}</h2>

View file

@ -7,7 +7,7 @@ updated: "now"
schema: music-index
---
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See more of the</strong> <a href="/music/artists/this-week/">artists</a>, <a href="/music/albums/this-week/">albums</a> or <a href="/music/tracks/this-week/">tracks</a> I've listened to this week. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music/this-month">this month</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
{% render "partials/blocks/now-playing.liquid", music:music %}

View file

@ -8,7 +8,7 @@ image: music.threeMonth.artists[0].image
schema: music-period
---
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See more of the</strong> <a href="/music/artists/three-months/">artists</a>, <a href="/music/albums/three-months/">albums</a> or <a href="/music/tracks/three-months/">tracks</a> I've listened to over the last 3 months. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/this-month">this month</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -8,7 +8,7 @@ image: music.month.artists[0].image
schema: music-period
---
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See more of the</strong> <a href="/music/artists/this-month/">artists</a>, <a href="/music/albums/this-month/">albums</a> or <a href="/music/tracks/this-month/">tracks</a> I've listened to this month. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.threeMonth.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.threeMonth.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.threeMonth.totalTracks }} tracks</strong> over the last 3 months. Most of that has been {{ music.threeMonth.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/artists/three-months/">artists</a> or <a href="/music/albums/three-months/">albums</a> I've listened to over the last 3 months. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/this-month">this month</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.month.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.month.totalTracks }} tracks</strong> this month. Most of that has been {{ music.month.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/artists/this-month/">artists</a> or <a href="/music/albums/this-month/">albums</a> this month. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music">this week</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />

View file

@ -12,7 +12,7 @@ schema: music
<a class="icon-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
{% if pagination.pageNumber == 0 %}
<h2>{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | sortByPlaysDescending: "plays" | mediaLinks: "genre", 5 }}.</p>
<p>I've listened to <strong class="highlight-text">{{ music.week.artists.size }} artists</strong>, <strong class="highlight-text">{{ music.week.albums.size }} albums</strong> and <strong class="highlight-text">{{ music.week.totalTracks }} tracks</strong> this week. Most of that has been {{ music.week.genres | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See the</strong> <a href="/music/artists/this-week/">artists</a> or <a href="/music/albums/this-week/">albums</a> I've listened to this week. <strong class="highlight-text">Or take a look at what I've listened to</strong> <a href="/music/this-month">this month</a> or <a href="/music/three-months">over the last 3 months</a>.</p>
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />