feat: add seo title and favicon respecting basePath
This commit is contained in:
committed by
Mathias Schopmans
parent
57d7e85331
commit
554607a58d
7
src/lib/format.ts
Normal file
7
src/lib/format.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
// Format the title of the page
|
||||
import { getAppName } from "@/lib/data";
|
||||
|
||||
export function formatTitle(title: string = ""): string {
|
||||
if (!title) return getAppName();
|
||||
return `${title} | ${getAppName()}`;
|
||||
}
|
||||
@@ -1,5 +1,12 @@
|
||||
import { type ClassValue, clsx } from "clsx";
|
||||
|
||||
import config from "../../next.config.mjs";
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return clsx(inputs);
|
||||
}
|
||||
|
||||
export function assetUrl(path: string) {
|
||||
if (!config.basePath) return path;
|
||||
return `${config.basePath}${path}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user