implement ssg config for blog posts in project ,

This commit is contained in:
mahdiarghyani
2025-11-10 18:09:18 +03:30
parent d2333d3db2
commit 713bb83981
37 changed files with 5505 additions and 297 deletions
+2 -2
View File
@@ -59,7 +59,7 @@ const handleImageError = () => {
// Convert collection path to route path (remove locale prefix)
const getRoutePath = (path: string) => {
// Remove locale prefix from path: /en/blog/... -> /blog/...
return path.replace(`/${locale.value}`, '')
// Remove any locale prefix from path: /en/blog/... or /fa/blog/... -> /blog/...
return path.replace(/^\/(en|fa)/, '')
}
</script>