mirror of
https://github.com/BlossomiShymae/clean-cuts.git
synced 2025-12-06 10:10:47 +01:00
12 lines
355 B
TypeScript
12 lines
355 B
TypeScript
export default defineNuxtRouteMiddleware((to, from) => {
|
|
useHead({
|
|
title: to.fullPath == "/" ? "Clean Cuts" : to.fullPath
|
|
.split("/")
|
|
.filter(x => x != "")
|
|
.map(x => x
|
|
.split("-") // Remove hypens
|
|
.map(x => x.charAt(0).toUpperCase() + x.slice(1)) // Titlecase words
|
|
.join(" "))
|
|
.join(" • ")
|
|
})
|
|
}); |