Files
next-gdrive-index/src/utils/footerFormatter.ts
T
2024-05-04 05:25:20 +07:00

20 lines
665 B
TypeScript

import config from "~/config/gIndex.config";
export function formatFooter(text: string[]): string {
return text
.join("\n")
.replaceAll("{{ year }}", new Date().getFullYear().toString())
.replaceAll(
"{{ repository }}",
"[Repository](https://github.com/mbaharip/next-gdrive-index)",
)
.replaceAll("{{ author }}", config.siteConfig.siteAuthor || "mbaharip")
.replaceAll("{{ version }}", config.version || "0.0.0")
.replaceAll("{{ siteName }}", config.siteConfig.siteName)
.replaceAll(
"{{ handle }}",
config.siteConfig.twitterHandle || "@__mbaharip__",
)
.replaceAll("{{ creator }}", "mbaharip");
}