feat: use relative paths for cover images
This commit is contained in:
1 parent
197d524b53
commit
3fcb566a54
4 files changed
+17
-5
No files matched your search
@@ -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