Add custom slugs support and simplify work URL
This commit is contained in:
parent
2fb7c6aafd
commit
d34ea209f7
|
|
@ -103,7 +103,9 @@ const { data: works } = await useFetch('/api/works', {
|
|||
|
||||
const work = computed(() => {
|
||||
if (!works.value) return null
|
||||
return works.value.find(w => slugify(w.title) === slug)
|
||||
return works.value.find(w =>
|
||||
(w.slug && w.slug === slug) || slugify(w.title) === slug
|
||||
)
|
||||
})
|
||||
|
||||
const year = computed(() => {
|
||||
|
|
|
|||
|
|
@ -1716,6 +1716,7 @@
|
|||
{
|
||||
"id": "QmkLEQND4lD4",
|
||||
"title": "for sirens perhaps, and/or ... (compact sets 4 - alarming)",
|
||||
"slug": "for_sirens_perhaps_and_or",
|
||||
"instrument_tags": [
|
||||
"sirens and/or sustaining instruments"
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue