From 018af8fe7f8c14af40d40bc7d0613a2a12fe8429 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 15 Jan 2022 21:38:47 +0800 Subject: [PATCH] =?UTF-8?q?feature=EF=BC=9A=20=E5=88=87=E6=8D=A2=E4=B8=BB?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/404.js | 4 ++-- pages/about.js | 6 +++--- pages/archive/index.js | 4 ++-- pages/article/[slug].js | 8 ++++---- pages/category/[category].js | 4 ++-- pages/category/index.js | 4 ++-- pages/index.js | 6 +++--- pages/page/[page].js | 4 ++-- pages/search.js | 4 ++-- pages/tag/[tag].js | 6 +++--- pages/tag/index.js | 4 ++-- .../NEXT/{Custom404Layout.js => Layout404.js} | 10 +++++----- .../{ArchiveLayout.js => LayoutArchive.js} | 10 +++++----- themes/NEXT/{BaseLayout.js => LayoutBase.js} | 14 ++++---------- .../{CategoryLayout.js => LayoutCategory.js} | 6 +++--- ...ryIndexLayout.js => LayoutCategoryIndex.js} | 10 +++++----- themes/NEXT/{IndexLayout.js => LayoutIndex.js} | 18 +++++++++--------- themes/NEXT/{PageLayout.js => LayoutPage.js} | 14 +++++++------- .../NEXT/{SearchLayout.js => LayoutSearch.js} | 12 ++++++------ .../NEXT/{ArticleLayout.js => LayoutSlug.js} | 14 +++++++------- themes/NEXT/{TagLayout.js => LayoutTag.js} | 10 +++++----- .../{TagIndexLayout.js => LayoutTagIndex.js} | 10 +++++----- themes/NEXT/{_NEXT.js => index.js} | 15 ++++++++++++--- themes/index.js | 13 +------------ 24 files changed, 101 insertions(+), 109 deletions(-) rename themes/NEXT/{Custom404Layout.js => Layout404.js} (86%) rename themes/NEXT/{ArchiveLayout.js => LayoutArchive.js} (88%) rename themes/NEXT/{BaseLayout.js => LayoutBase.js} (95%) rename themes/NEXT/{CategoryLayout.js => LayoutCategory.js} (86%) rename themes/NEXT/{CategoryIndexLayout.js => LayoutCategoryIndex.js} (87%) rename themes/NEXT/{IndexLayout.js => LayoutIndex.js} (62%) rename themes/NEXT/{PageLayout.js => LayoutPage.js} (57%) rename themes/NEXT/{SearchLayout.js => LayoutSearch.js} (89%) rename themes/NEXT/{ArticleLayout.js => LayoutSlug.js} (88%) rename themes/NEXT/{TagLayout.js => LayoutTag.js} (81%) rename themes/NEXT/{TagIndexLayout.js => LayoutTagIndex.js} (80%) rename themes/NEXT/{_NEXT.js => index.js} (87%) diff --git a/pages/404.js b/pages/404.js index 1668ea71..7fd48806 100644 --- a/pages/404.js +++ b/pages/404.js @@ -1,4 +1,4 @@ -import { Custom404Layout } from '@/themes' +import { Layout404 } from '@/themes' /** * 自定义404界面 @@ -7,5 +7,5 @@ import { Custom404Layout } from '@/themes' */ export default function Custom404 () { - return + return } diff --git a/pages/about.js b/pages/about.js index d3309ca8..af382f68 100644 --- a/pages/about.js +++ b/pages/about.js @@ -2,18 +2,18 @@ import { getPostBlocks } from '@/lib/notion' import { getGlobalNotionData } from '@/lib/notion/getNotionData' import Custom404 from '@/pages/404' import React from 'react' -import { ArticleLayout } from '@/themes' +import { LayoutSlug } from '@/themes' /** * 关于页面,默认取notion中slug为about的文章 - * @param {*} param0 + * @param {*} props * @returns */ const About = (props) => { if (!props.post) { return } - return + return } export async function getStaticProps () { diff --git a/pages/archive/index.js b/pages/archive/index.js index 51c34dba..3e4a4f52 100644 --- a/pages/archive/index.js +++ b/pages/archive/index.js @@ -1,6 +1,6 @@ import { getGlobalNotionData } from '@/lib/notion/getNotionData' import React from 'react' -import { ArchiveLayout } from '@/themes' +import { LayoutArchive } from '@/themes' export async function getStaticProps () { const { allPosts, categories, tags, postCount } = @@ -18,7 +18,7 @@ export async function getStaticProps () { } const ArchiveIndex = (props) => { - return + return } export default ArchiveIndex diff --git a/pages/article/[slug].js b/pages/article/[slug].js index aefc8e7e..60ab8f31 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -1,19 +1,19 @@ import BLOG from '@/blog.config' import { getPostBlocks } from '@/lib/notion' import { getGlobalNotionData } from '@/lib/notion/getNotionData' -import { ArticleLayout } from '@/themes' +import { LayoutSlug } from '@/themes' import Custom404 from '@/pages/404' /** * 根据notion的slug访问页面 - * @param {*} param0 + * @param {*} props * @returns */ const Slug = (props) => { if (!props.post) { return } - return + return } export async function getStaticPaths () { @@ -69,7 +69,7 @@ export async function getStaticProps ({ params: { slug } }) { /** * - * @param {获取文章推荐文章} post + * @param post * @param {*} allPosts * @param {*} count * @returns diff --git a/pages/category/[category].js b/pages/category/[category].js index a7006496..a2ecff19 100644 --- a/pages/category/[category].js +++ b/pages/category/[category].js @@ -1,9 +1,9 @@ import { getGlobalNotionData } from '@/lib/notion/getNotionData' import React from 'react' -import { CategoryLayout } from '@/themes' +import { LayoutCategory } from '@/themes' export default function Category (props) { - return + return } export async function getStaticProps ({ params }) { diff --git a/pages/category/index.js b/pages/category/index.js index e8b44a05..c295f452 100644 --- a/pages/category/index.js +++ b/pages/category/index.js @@ -1,9 +1,9 @@ import { getGlobalNotionData } from '@/lib/notion/getNotionData' import React from 'react' -import { CategoryIndexLayout } from '@/themes' +import { LayoutCategoryIndex } from '@/themes' export default function Category (props) { - return + return } export async function getStaticProps () { diff --git a/pages/index.js b/pages/index.js index f95a287d..6fbb1073 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,10 +1,10 @@ import BLOG from '@/blog.config' import { getPostBlocks } from '@/lib/notion' import { getGlobalNotionData } from '@/lib/notion/getNotionData' -import { IndexLayout } from '@/themes' +import { LayoutIndex } from '@/themes' const Index = (props) => { - return + return } export async function getStaticProps () { @@ -18,7 +18,7 @@ export async function getStaticProps () { // 处理分页 const page = 1 - let postsToShow = [] + let postsToShow if (BLOG.postListStyle !== 'page') { postsToShow = Array.from(allPosts) } else { diff --git a/pages/page/[page].js b/pages/page/[page].js index db2793d0..071f7185 100644 --- a/pages/page/[page].js +++ b/pages/page/[page].js @@ -1,10 +1,10 @@ import BLOG from '@/blog.config' import { getPostBlocks } from '@/lib/notion' import { getGlobalNotionData } from '@/lib/notion/getNotionData' -import { PageLayout } from '@/themes' +import { LayoutPage } from '@/themes' const Page = (props) => { - return + return } export async function getStaticPaths () { diff --git a/pages/search.js b/pages/search.js index 43a6de6e..79854860 100644 --- a/pages/search.js +++ b/pages/search.js @@ -1,5 +1,5 @@ import { getGlobalNotionData } from '@/lib/notion/getNotionData' -import { SearchLayout } from '@/themes' +import { LayoutSearch } from '@/themes' export async function getStaticProps () { const { @@ -22,7 +22,7 @@ export async function getStaticProps () { } const Search = (props) => { - return + return } export default Search diff --git a/pages/tag/[tag].js b/pages/tag/[tag].js index e2f3234f..908c329d 100644 --- a/pages/tag/[tag].js +++ b/pages/tag/[tag].js @@ -1,8 +1,8 @@ import { getGlobalNotionData } from '@/lib/notion/getNotionData' -import { TagLayout } from '@/themes' +import { LayoutTag } from '@/themes' const Tag = (props) => { - return + return } export async function getStaticProps ({ params }) { @@ -37,8 +37,8 @@ export async function getStaticProps ({ params }) { /** * 获取所有的标签 - * @param {*}} allPosts * @returns + * @param tags */ function getTagNames (tags) { const tagNames = [] diff --git a/pages/tag/index.js b/pages/tag/index.js index 15df1c51..5260a5ca 100644 --- a/pages/tag/index.js +++ b/pages/tag/index.js @@ -1,9 +1,9 @@ import { getGlobalNotionData } from '@/lib/notion/getNotionData' import React from 'react' -import { TagIndexLayout } from '@/themes' +import { LayoutTagIndex } from '@/themes' const TagIndex = (props) => { - return + return } export async function getStaticProps () { diff --git a/themes/NEXT/Custom404Layout.js b/themes/NEXT/Layout404.js similarity index 86% rename from themes/NEXT/Custom404Layout.js rename to themes/NEXT/Layout404.js index 8d4306b1..61666e00 100644 --- a/themes/NEXT/Custom404Layout.js +++ b/themes/NEXT/Layout404.js @@ -1,11 +1,11 @@ import { useRouter } from 'next/router' -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import BLOG from '@/blog.config' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faSpinner } from '@fortawesome/free-solid-svg-icons' import { useEffect } from 'react' -const Custom404Layout = () => { +const Layout404 = () => { const router = useRouter() useEffect(() => { // 延时3秒如果加载失败就返回首页 @@ -21,7 +21,7 @@ const Custom404Layout = () => { }, 30000000) }) - return + return
@@ -31,7 +31,7 @@ const Custom404Layout = () => {
-
+ } -export default Custom404Layout +export default Layout404 diff --git a/themes/NEXT/ArchiveLayout.js b/themes/NEXT/LayoutArchive.js similarity index 88% rename from themes/NEXT/ArchiveLayout.js rename to themes/NEXT/LayoutArchive.js index 99eba611..d47e39e2 100644 --- a/themes/NEXT/ArchiveLayout.js +++ b/themes/NEXT/LayoutArchive.js @@ -1,11 +1,11 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' import React, { useEffect } from 'react' -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import BlogPostArchive from './components/BlogPostArchive' import Live2D from './components/Live2D' -const ArchiveLayout = ({ posts, tags, categories, postCount }) => { +const LayoutArchive = ({ posts, tags, categories, postCount }) => { const { locale } = useGlobal() // 深拷贝 const postsSortByDate = Object.create(posts) @@ -49,7 +49,7 @@ const ArchiveLayout = ({ posts, tags, categories, postCount }) => { }, []) return ( - +
{Object.keys(archivePosts).map(archiveTitle => ( { ))}
-
+ ) } -export default ArchiveLayout +export default LayoutArchive diff --git a/themes/NEXT/BaseLayout.js b/themes/NEXT/LayoutBase.js similarity index 95% rename from themes/NEXT/BaseLayout.js rename to themes/NEXT/LayoutBase.js index a2144030..4e963b47 100644 --- a/themes/NEXT/BaseLayout.js +++ b/themes/NEXT/LayoutBase.js @@ -17,23 +17,18 @@ import smoothscroll from 'smoothscroll-polyfill' * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 * @param children * @param layout - * @param fullWidth * @param tags * @param meta * @param post - * @param totalPosts * @param currentSearch * @param currentCategory * @param currentTag * @param categories - * @param customMeta * @returns {JSX.Element} * @constructor */ -const BaseLayout = ({ +const LayoutBase = ({ children, - layout, - fullWidth, headerSlot, tags, meta, @@ -45,8 +40,7 @@ const BaseLayout = ({ currentSearch, currentCategory, currentTag, - categories, - ...customMeta + categories }) => { const { onLoading } = useGlobal() const targetRef = useRef(null) @@ -111,8 +105,8 @@ const BaseLayout = ({ ) } -BaseLayout.propTypes = { +LayoutBase.propTypes = { children: PropTypes.node } -export default BaseLayout +export default LayoutBase diff --git a/themes/NEXT/CategoryLayout.js b/themes/NEXT/LayoutCategory.js similarity index 86% rename from themes/NEXT/CategoryLayout.js rename to themes/NEXT/LayoutCategory.js index d6a27613..4b6e0089 100644 --- a/themes/NEXT/CategoryLayout.js +++ b/themes/NEXT/LayoutCategory.js @@ -1,6 +1,6 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' -import BaseLayout from '@/themes/NEXT/BaseLayout' +import LayoutBase from '@/themes/NEXT/LayoutBase' import StickyBar from './components/StickyBar' import CategoryList from './components/CategoryList' import BlogPostListScroll from './components/BlogPostListScroll' @@ -12,14 +12,14 @@ const Category = ({ tags, posts, category, categories, latestPosts, postCount }) description: BLOG.description, type: 'website' } - return + return
-
+ } export default Category diff --git a/themes/NEXT/CategoryIndexLayout.js b/themes/NEXT/LayoutCategoryIndex.js similarity index 87% rename from themes/NEXT/CategoryIndexLayout.js rename to themes/NEXT/LayoutCategoryIndex.js index fa2bb7a3..d545e300 100644 --- a/themes/NEXT/CategoryIndexLayout.js +++ b/themes/NEXT/LayoutCategoryIndex.js @@ -1,11 +1,11 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faFolder, faThList } from '@fortawesome/free-solid-svg-icons' import Link from 'next/link' -const CategoryIndexLayout = ({ +const LayoutCategoryIndex = ({ tags, allPosts, categories, @@ -18,7 +18,7 @@ const CategoryIndexLayout = ({ description: BLOG.description, type: 'website' } - return + return
{locale.COMMON.CATEGORY}: @@ -34,7 +34,7 @@ const CategoryIndexLayout = ({ })}
-
+ } -export default CategoryIndexLayout +export default LayoutCategoryIndex diff --git a/themes/NEXT/IndexLayout.js b/themes/NEXT/LayoutIndex.js similarity index 62% rename from themes/NEXT/IndexLayout.js rename to themes/NEXT/LayoutIndex.js index aa57013d..ddf457c9 100644 --- a/themes/NEXT/IndexLayout.js +++ b/themes/NEXT/LayoutIndex.js @@ -1,31 +1,31 @@ -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import Header from './components/Header' import LatestPostsGroup from './components/LatestPostsGroup' import Card from './components/Card' import BlogPostListScroll from './components/BlogPostListScroll' import BlogPostListPage from './components/BlogPostListPage' -import _NEXT from './_NEXT' +import { CONFIG_NEXT } from './index' -const IndexLayout = ({ posts, tags, meta, categories, postCount, latestPosts }) => { - return } +const LayoutIndex = ({ posts, tags, meta, categories, postCount, latestPosts }) => { + return } meta={meta} tags={tags} sideBarSlot={} rightAreaSlot={ - _NEXT.RIGHT_LATEST_POSTS && + CONFIG_NEXT.RIGHT_LATEST_POSTS && } postCount={postCount} categories={categories} > - {_NEXT.POSTS_LIST_TYPE !== 'page' + {CONFIG_NEXT.POSTS_LIST_TYPE !== 'page' ? ( ) : ( )} - + } -export default IndexLayout +export default LayoutIndex diff --git a/themes/NEXT/PageLayout.js b/themes/NEXT/LayoutPage.js similarity index 57% rename from themes/NEXT/PageLayout.js rename to themes/NEXT/LayoutPage.js index 3bd00af3..4e2f62ee 100644 --- a/themes/NEXT/PageLayout.js +++ b/themes/NEXT/LayoutPage.js @@ -1,21 +1,21 @@ -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import LatestPostsGroup from './components/LatestPostsGroup' import BlogPostListPage from './components/BlogPostListPage' -import _NEXT from './_NEXT' +import { CONFIG_NEXT } from './index' -const PageLayout = ({ page, posts, tags, meta, categories, postCount, latestPosts }) => { +const LayoutPage = ({ page, posts, tags, meta, categories, postCount, latestPosts }) => { return ( - } - rightAreaSlot={_NEXT.RIGHT_LATEST_POSTS && } + rightAreaSlot={CONFIG_NEXT.RIGHT_LATEST_POSTS && } postCount={postCount} categories={categories} > - + ) } -export default PageLayout +export default LayoutPage diff --git a/themes/NEXT/SearchLayout.js b/themes/NEXT/LayoutSearch.js similarity index 89% rename from themes/NEXT/SearchLayout.js rename to themes/NEXT/LayoutSearch.js index 6dac1821..1364cf63 100644 --- a/themes/NEXT/SearchLayout.js +++ b/themes/NEXT/LayoutSearch.js @@ -1,4 +1,4 @@ -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import StickyBar from './components/StickyBar' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faSearch } from '@fortawesome/free-solid-svg-icons' @@ -7,8 +7,8 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' import { useRouter } from 'next/router' -const SearchLayout = ({ posts, tags, categories, postCount }) => { - let filteredPosts = [] +const LayoutSearch = ({ posts, tags, categories, postCount }) => { + let filteredPosts const searchKey = getSearchKey() if (searchKey) { filteredPosts = posts.filter(post => { @@ -27,7 +27,7 @@ const SearchLayout = ({ posts, tags, categories, postCount }) => { type: 'website' } return ( - {
-
+ ) } -export default SearchLayout +export default LayoutSearch function getSearchKey () { const router = useRouter() diff --git a/themes/NEXT/ArticleLayout.js b/themes/NEXT/LayoutSlug.js similarity index 88% rename from themes/NEXT/ArticleLayout.js rename to themes/NEXT/LayoutSlug.js index 50dafe6a..3fbec9db 100644 --- a/themes/NEXT/ArticleLayout.js +++ b/themes/NEXT/LayoutSlug.js @@ -1,7 +1,7 @@ import BLOG from '@/blog.config' import { getPageTableOfContents } from 'notion-utils' import TocDrawerButton from './components/TocDrawerButton' -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import Card from './components/Card' import LatestPostsGroup from './components/LatestPostsGroup' import ArticleDetail from './components/ArticleDetail' @@ -14,9 +14,9 @@ import 'prismjs/components/prism-javascript' import 'prismjs/components/prism-markup' import 'prismjs/components/prism-python' import 'prismjs/components/prism-typescript' -import _NEXT from './_NEXT' +import { CONFIG_NEXT } from './index' -const ArticleLayout = ({ +const LayoutSlug = ({ post, tags, prev, @@ -44,7 +44,7 @@ const ArticleLayout = ({ : null return ( - + CONFIG_NEXT.RIGHT_LATEST_POSTS && } > - + ) } -export default ArticleLayout +export default LayoutSlug diff --git a/themes/NEXT/TagLayout.js b/themes/NEXT/LayoutTag.js similarity index 81% rename from themes/NEXT/TagLayout.js rename to themes/NEXT/LayoutTag.js index f0b3606b..d0d3c291 100644 --- a/themes/NEXT/TagLayout.js +++ b/themes/NEXT/LayoutTag.js @@ -1,11 +1,11 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import StickyBar from './components/StickyBar' import TagList from './components/TagList' import BlogPostListScroll from './components/BlogPostListScroll' -const TagLayout = ({ tags, posts, tag, categories, postCount, latestPosts }) => { +const LayoutTag = ({ tags, posts, tag, categories, postCount, latestPosts }) => { const { locale } = useGlobal() const meta = { @@ -19,14 +19,14 @@ const TagLayout = ({ tags, posts, tag, categories, postCount, latestPosts }) => const currentTag = tags?.find(r => r?.name === tag) const newTags = currentTag ? [currentTag].concat(tags.filter(r => r?.name !== tag)) : tags.filter(r => r?.name !== tag) - return + return
-
+ } -export default TagLayout +export default LayoutTag diff --git a/themes/NEXT/TagIndexLayout.js b/themes/NEXT/LayoutTagIndex.js similarity index 80% rename from themes/NEXT/TagIndexLayout.js rename to themes/NEXT/LayoutTagIndex.js index 368c00b1..c37556ef 100644 --- a/themes/NEXT/TagIndexLayout.js +++ b/themes/NEXT/LayoutTagIndex.js @@ -1,18 +1,18 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' -import BaseLayout from './BaseLayout' +import LayoutBase from './LayoutBase' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faTags } from '@fortawesome/free-solid-svg-icons' import TagItem from './components/TagItem' -const TagIndexLayout = ({ tags, categories, postCount, latestPosts }) => { +const LayoutTagIndex = ({ tags, categories, postCount, latestPosts }) => { const { locale } = useGlobal() const meta = { title: `${locale.COMMON.TAGS} | ${BLOG.title}`, description: BLOG.description, type: 'website' } - return + return
{locale.COMMON.TAGS}:
@@ -21,6 +21,6 @@ const TagIndexLayout = ({ tags, categories, postCount, latestPosts }) => { }) }
-
+ } -export default TagIndexLayout +export default LayoutTagIndex diff --git a/themes/NEXT/_NEXT.js b/themes/NEXT/index.js similarity index 87% rename from themes/NEXT/_NEXT.js rename to themes/NEXT/index.js index 4e961909..49cd56d1 100644 --- a/themes/NEXT/_NEXT.js +++ b/themes/NEXT/index.js @@ -1,4 +1,15 @@ -const _NEXT = { +export const LayoutIndex = import('./LayoutIndex') +export const LayoutSearch = import('./LayoutSearch') +export const LayoutArchive = import('./LayoutArchive') +export const LayoutSlug = import('./LayoutSlug') +export const Layout404 = import('./Layout404') +export const LayoutCategory = import('./LayoutCategory') +export const LayoutCategoryIndex = import('./LayoutCategoryIndex') +export const LayoutPage = import('./LayoutPage') +export const LayoutTag = import('./LayoutTag') +export const LayoutTagIndex = import('./LayoutTagIndex') + +export const CONFIG_NEXT = { // 首页相关配置 HOME_BANNER: false, // 首页是否显示大图及标语 [true,false] POSTS_LIST_TYPE: 'page', // ['page','scroll] 文章列表样式:页码分页、单页滚动加载 @@ -74,5 +85,3 @@ const _NEXT = { TidioId: '' // https://www.tidio.com/ } } -// export default BLOG -module.exports = _NEXT diff --git a/themes/index.js b/themes/index.js index 3a3d7059..7a6abb4b 100644 --- a/themes/index.js +++ b/themes/index.js @@ -1,12 +1 @@ -import dynamic from 'next/dynamic' - -export const IndexLayout = dynamic(() => import('./NEXT/IndexLayout'), { ssr: false }) -export const SearchLayout = dynamic(() => import('./NEXT/SearchLayout'), { ssr: false }) -export const ArchiveLayout = dynamic(() => import('./NEXT/ArchiveLayout'), { ssr: false }) -export const ArticleLayout = dynamic(() => import('./NEXT/ArticleLayout'), { ssr: false }) -export const Custom404Layout = dynamic(() => import('./NEXT/Custom404Layout'), { ssr: false }) -export const CategoryLayout = dynamic(() => import('./NEXT/CategoryLayout'), { ssr: false }) -export const CategoryIndexLayout = dynamic(() => import('./NEXT/CategoryIndexLayout'), { ssr: false }) -export const PageLayout = dynamic(() => import('./NEXT/PageLayout'), { ssr: false }) -export const TagLayout = dynamic(() => import('./NEXT/TagLayout'), { ssr: false }) -export const TagIndexLayout = dynamic(() => import('./NEXT/TagIndexLayout'), { ssr: false }) +export * from './NEXT' // 切换主题