mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
@@ -297,6 +297,8 @@ const CONFIG = {
|
||||
STARTER_404_TEXT: '抱歉!您要查找的页面不存在。可能已经移动或删除。',
|
||||
STARTER_404_BACK: '回到主页',
|
||||
|
||||
STARTER_POST_REDIRECT_ENABLE: true, // 默認開啟重定向
|
||||
STARTER_POST_REDIRECT_URL: 'https://blog.tangly1024.com', // 重定向域名
|
||||
STARTER_NEWSLETTER: process.env.NEXT_PUBLIC_THEME_STARTER_NEWSLETTER || false // 是否开启邮件订阅 请先配置mailchimp功能 https://docs.tangly1024.com/article/notion-next-mailchimp
|
||||
}
|
||||
export default CONFIG
|
||||
|
||||
@@ -112,10 +112,10 @@ const LayoutIndex = (props) => {
|
||||
const LayoutSlug = (props) => {
|
||||
// 如果 是 /article/[slug] 的文章路径则进行重定向到另一个域名
|
||||
const router = useRouter()
|
||||
if (siteConfig('LANDING_POST_REDIRECT_ENABLE', null, CONFIG) && isBrowser && router.route === '/[prefix]/[slug]') {
|
||||
const redirectUrl = siteConfig('LANDING_POST_REDIRECT_URL', null, CONFIG) + router.asPath.replace('?theme=landing', '')
|
||||
if (siteConfig('STARTER_POST_REDIRECT_ENABLE', null, CONFIG) && isBrowser && router.route === '/[prefix]/[slug]') {
|
||||
const redirectUrl = siteConfig('STARTER_POST_REDIRECT_URL', null, CONFIG) + router.asPath.replace('?theme=landing', '')
|
||||
router.push(redirectUrl)
|
||||
return <div id='theme-landing'><Loading /></div>
|
||||
return <div id='theme-starter'><Loading /></div>
|
||||
}
|
||||
|
||||
const { post } = props
|
||||
|
||||
Reference in New Issue
Block a user