mirror of
https://github.com/mmahdium/portfolio.git
synced 2026-08-17 05:24:30 +03:30
implement ssg config for blog posts in project ,
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user