diff --git a/package-lock.json b/package-lock.json index 05b3a06a..8302db6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "3.3.1", + "version": "3.3.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "3.3.1", + "version": "3.3.3", "license": "MIT", "dependencies": { "@11ty/eleventy-fetch": "4.0.1", diff --git a/package.json b/package.json index 8a5fb131..922d6f29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "3.3.2", + "version": "3.3.3", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "engines": { diff --git a/src/assets/styles/base/index.css b/src/assets/styles/base/index.css index d5505bd2..58e36977 100644 --- a/src/assets/styles/base/index.css +++ b/src/assets/styles/base/index.css @@ -255,7 +255,7 @@ h1 { h2 { font-size: var(--font-size-xl); - &.page-header { + &.page-title { margin-top: 0; } } diff --git a/src/includes/metadata.liquid b/src/includes/metadata.liquid index b9c97ebe..3e71f29a 100644 --- a/src/includes/metadata.liquid +++ b/src/includes/metadata.liquid @@ -2,7 +2,6 @@ {%- assign pageTitle = globals.site_name -%} {%- assign pageDescription = globals.site_description -%} {%- assign ogImage = globals.cdn_url | append: globals.avatar -%} - {%- case schema -%} {%- when 'blog' -%} {%- assign pageTitle = post.title -%} @@ -12,7 +11,7 @@ {%- if page.title -%} {%- assign pageTitle = 'Music / ' | append: page.title -%} {%- else -%} - {%- assign pageTitle = 'Music / ' | append: globals.site_name -%} + {%- assign pageTitle = 'Music' -%} {%- endif -%} {%- if schema == 'music' -%} {%- assign ogImage = globals.cdn_url | append: page.image -%} @@ -34,6 +33,7 @@ {%- assign pageDescription = book.review | markdown | strip_html | default: book.description | htmlTruncate -%} {%- assign ogImage = globals.cdn_url | append: book.image -%} {%- when 'books' -%} + {%- assign pageTitle = 'Books' -%} {%- assign overviewBook = books.all | filterBooksByStatus: 'started' | reverse | first %} {%- assign ogImage = globals.cdn_url | append: overviewBook.image -%} {%- when 'books-year' -%} @@ -48,34 +48,38 @@ {%- assign pageDescription = movie.review | markdown | strip_html | default: movie.description | htmlTruncate -%} {%- assign ogImage = globals.cdn_url | append: movie.backdrop -%} {%- when 'favorite-movies' -%} + {%- assign pageTitle = 'Favorite movies' -%} {%- assign favoriteMovie = movies.favorites | shuffleArray | first %} {%- assign ogImage = globals.cdn_url | append: favoriteMovie.backdrop -%} {%- when 'show' -%} - {%- assign pageTitle = 'Shows / ' | append: show.title -%} + {%- assign pageTitle = 'Show / ' | append: show.title -%} {%- assign pageDescription = show.review | markdown | strip_html | default: show.description | htmlTruncate -%} {%- assign ogImage = globals.cdn_url | append: show.backdrop -%} {%- when 'favorite-shows' -%} + {%- assign pageTitle = 'Favorite shows' -%} {%- assign favoriteShow = tv.favorites | shuffleArray | first %} {%- assign ogImage = globals.cdn_url | append: favoriteShow.backdrop -%} {%- when 'watching' -%} + {%- assign pageTitle = 'Watching' -%} {%- assign overviewMovie = movies.recentlyWatched | first %} {%- assign ogImage = globals.cdn_url | append: overviewMovie.backdrop -%} - {%- else -%} - {%- if title -%} - {%- assign pageTitle = title -%} - {%- elsif page.title -%} - {%- assign pageTitle = page.title -%} - {%- endif -%} - {%- if page.description -%} - {%- assign pageDescription = page.description -%} - {%- elsif description -%} - {%- assign pageDescription = description -%} - {%- endif -%} + {%- when 'page' -%} + {%- assign pageTitle = page.title -%} + {%- assign pageDescription = page.description -%} {% endcase %} - -{%- assign pageTitle = pageTitle | append: ' / ' | append: globals.site_name -%} +{%- if title -%} + {%- assign pageTitle = title -%} +{%- endif -%} +{%- if description -%} + {%- assign pageDescription = description -%} +{%- endif -%} +{%- if pageTitle != globals.site_name and schema != 'blog' -%} + {%- assign pageTitle = pageTitle | append: ' / ' | append: globals.site_name -%} +{%- endif -%} {%- assign escapedPageDescription = pageDescription | escape -%} - + + +