+
{/* 网页SEO */}
@@ -72,11 +78,24 @@ const LayoutIndex = (props) => {
* @param {*} props
* @returns
*/
-const LayoutSlug = (props) =>
-
-
-
-
+const LayoutSlug = (props) => {
+ // 如果 是 /article/[slug] 的文章路径则进行重定向到另一个域名
+ const router = useRouter()
+ if (JSON.parse(CONFIG.POST_REDIRECT_ENABLE) && isBrowser && router.route == '/[prefix]/[slug]') {
+ const redirectUrl = CONFIG.POST_REDIRECT_URL + router.asPath.replace('?theme=landing', '')
+ router.push(redirectUrl)
+ return
+ }
+
+ return
+
+
+
+
+
+
+
+}
// 其他布局暂时留空
const LayoutSearch = (props) =>