2023-12-25 17:21:39 +08:00
|
|
|
import { Config } from "@/data/config";
|
2024-08-12 13:53:28 +08:00
|
|
|
import { getCurrentTime } from "@/lib/date";
|
2023-12-25 17:21:39 +08:00
|
|
|
import path from "path";
|
|
|
|
|
import process from "process";
|
|
|
|
|
|
2024-04-03 22:08:27 +08:00
|
|
|
export const LatestPostCountInHomePage = 10;
|
|
|
|
|
export const PostCountPerPagination = 10;
|
2024-08-12 13:53:28 +08:00
|
|
|
export const UserDataDirectory = path.join(process.cwd(), "./data");
|
|
|
|
|
export const PostFilesDirectory = path.join(UserDataDirectory, "/posts");
|
2023-12-25 17:21:39 +08:00
|
|
|
|
2023-12-29 19:55:54 +08:00
|
|
|
export const RSSFeedURL = `https://${Config.SiteDomain}/rss.xml`;
|
|
|
|
|
export const WebsiteURL = `https://${Config.SiteDomain}/`;
|
2024-08-12 13:53:28 +08:00
|
|
|
export const PostURL = (postId: string) => `https://${Config.SiteDomain}/blog/${postId}`;
|
|
|
|
|
export const SearchURL = (keyword: string) => `https://${Config.SiteDomain}/search/?q=${keyword}`;
|
2023-12-29 19:55:54 +08:00
|
|
|
|
2024-08-12 13:53:28 +08:00
|
|
|
const year = getCurrentTime().year;
|
2024-08-14 11:24:25 +08:00
|
|
|
export const CopyrightAnnouncement = `COPYRIGHT © ${Config.YearStart === year ? year : `${Config.YearStart}-${year}`} ${Config.AuthorName} ALL RIGHTS RESERVED`;
|