fix: url consistency
This commit is contained in:
parent
d83bde5432
commit
d4fd175ab9
4 changed files with 5 additions and 4 deletions
|
@ -75,6 +75,7 @@
|
||||||
/articles/ / 301!
|
/articles/ / 301!
|
||||||
/tags /search 301!
|
/tags /search 301!
|
||||||
/referrals /save 301!
|
/referrals /save 301!
|
||||||
|
/genre/* /genres/:splat 301!
|
||||||
/recent/movies /watching/recent/movies 301!
|
/recent/movies /watching/recent/movies 301!
|
||||||
/recent/shows /watching/recent/shows 301!
|
/recent/shows /watching/recent/shows 301!
|
||||||
/mastodon https://social.lol/@cory 301!
|
/mastodon https://social.lol/@cory 301!
|
||||||
|
|
|
@ -259,14 +259,14 @@ export default {
|
||||||
|
|
||||||
const allButLast = dataSlice.slice(0, -1).map(item => {
|
const allButLast = dataSlice.slice(0, -1).map(item => {
|
||||||
if (type === 'genre') {
|
if (type === 'genre') {
|
||||||
return `<a href="/music/genre/${sanitizeMediaString(item)}">${item}</a>`
|
return `<a href="/music/genres/${sanitizeMediaString(item)}">${item}</a>`
|
||||||
} else if (type === 'artist') {
|
} else if (type === 'artist') {
|
||||||
return `<a href="/music/artists/${sanitizeMediaString(item['name_string'])}-${sanitizeMediaString(item['country'].toLowerCase())}">${item['name_string']}</a>`
|
return `<a href="/music/artists/${sanitizeMediaString(item['name_string'])}-${sanitizeMediaString(item['country'].toLowerCase())}">${item['name_string']}</a>`
|
||||||
}
|
}
|
||||||
}).join(', ')
|
}).join(', ')
|
||||||
|
|
||||||
const last = type === 'genre'
|
const last = type === 'genre'
|
||||||
? `<a href="/music/genre/${sanitizeMediaString(dataSlice[dataSlice.length - 1])}">${dataSlice[dataSlice.length - 1]}</a>`
|
? `<a href="/music/genres/${sanitizeMediaString(dataSlice[dataSlice.length - 1])}">${dataSlice[dataSlice.length - 1]}</a>`
|
||||||
: `<a href="/music/artists/${sanitizeMediaString(dataSlice[dataSlice.length - 1]['name_string'])}-${sanitizeMediaString(dataSlice[dataSlice.length - 1]['country'].toLowerCase())}">${dataSlice[dataSlice.length - 1]['name_string']}</a>`
|
: `<a href="/music/artists/${sanitizeMediaString(dataSlice[dataSlice.length - 1]['name_string'])}-${sanitizeMediaString(dataSlice[dataSlice.length - 1]['country'].toLowerCase())}">${dataSlice[dataSlice.length - 1]['name_string']}</a>`
|
||||||
|
|
||||||
return `${allButLast} and ${last}`
|
return `${allButLast} and ${last}`
|
||||||
|
|
|
@ -29,7 +29,7 @@ schema: artist
|
||||||
<p class="sub-meta"><strong class="highlight-text">{{ artist.total_plays }} plays</strong></p>
|
<p class="sub-meta"><strong class="highlight-text">{{ artist.total_plays }} plays</strong></p>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
<p class="sub-meta">
|
<p class="sub-meta">
|
||||||
<a href="https://coryd.dev/music/genre/{{ artist.genre | slugify | downcase }}">
|
<a href="https://coryd.dev/music/genres/{{ artist.genre | slugify | downcase }}">
|
||||||
{{ artist.genre }}
|
{{ artist.genre }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -4,7 +4,7 @@ pagination:
|
||||||
data: genres
|
data: genres
|
||||||
size: 1
|
size: 1
|
||||||
alias: genre
|
alias: genre
|
||||||
permalink: /music/genre/{{ genre.name | slugify | downcase }}/index.html
|
permalink: /music/genres/{{ genre.name | slugify | downcase }}/index.html
|
||||||
updated: "now"
|
updated: "now"
|
||||||
schema: genre
|
schema: genre
|
||||||
---
|
---
|
||||||
|
|
Reference in a new issue