Get all projects and update sitemaps for it immediatly as well
This commit is contained in:
@@ -7,4 +7,15 @@ export function getBlogRoute(blogSettings: BlogSettings, blog: BlogPost) {
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, '0'))
|
||||
.replaceAll("%R", blog.url)
|
||||
.replace(/\/+/g, '/');
|
||||
}
|
||||
}
|
||||
|
||||
export function getProjectRoute(projectSettings: ProjectSettings, project: ProjectPost) {
|
||||
const date = new Date(project.date);
|
||||
|
||||
return projectSettings.projectRouteTemplate
|
||||
.replaceAll("%Y", date.getFullYear().toString())
|
||||
.replaceAll("%M", (date.getMonth() + 1).toString().padStart(2, '0'))
|
||||
.replaceAll("%D", date.getDate().toString().padStart(2, '0'))
|
||||
.replaceAll("%R", project.url)
|
||||
.replace(/\/+/g, '/');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user