mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-12 07:12:52 +01:00
feat: use relative paths for cover images
This commit is contained in:
@@ -18,3 +18,11 @@ export function getCategoryUrl(category: string): string | null {
|
||||
if (!category) return null
|
||||
return `/archive/category/${category}`
|
||||
}
|
||||
|
||||
export function getDir(path: string): string {
|
||||
const lastSlashIndex = path.lastIndexOf('/')
|
||||
if (lastSlashIndex < 0) {
|
||||
return '/'
|
||||
}
|
||||
return path.substring(0, lastSlashIndex + 1)
|
||||
}
|
||||
Reference in New Issue
Block a user