合并动态主题分支

This commit is contained in:
tangly1024
2022-03-15 13:25:19 +08:00
28 changed files with 294 additions and 139 deletions

View File

@@ -8,11 +8,13 @@ const BLOG = {
KEYWORDS: 'Notion, 博客', // 网站关键词 英文逗号隔开
NOTION_PAGE_ID: process.env.NOTION_PAGE_ID || '02ab3b8678004aa69e9e415905ef32a5', // Important page_idDuplicate Template from https://www.notion.so/tanghh/02ab3b8678004aa69e9e415905ef32a5
NOTION_ACCESS_TOKEN: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public
DEBUG_BUTTON: true, // 是否显示调试按钮,可以用来调试不同的主题和样式配置
THEME: process.env.NEXT_PUBLIC_THEME || 'next', // 主题, 支持 ['Next','Hexo',"Fukasawa','Medium']
LANG: 'zh-CN', // e.g 'zh-CN','en-US' see /lib/lang.js for more.
SINCE: 2021, // e.g if leave this empty, current year will be used.
BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '', // 备案号 闽ICP备XXXXXXX
APPEARANCE: 'auto', // ['light', 'dark', 'auto'],
APPEARANCE: 'light', // ['light', 'dark', 'auto'], // light 日间模式 dark夜间模式 auto根据时间和主题自动夜间模式
FONT: 'font-serif tracking-wider subpixel-antialiased', // 文章字体 ['font-sans', 'font-serif', 'font-mono'] @see https://www.tailwindcss.cn/docs/font-family
FONT_AWESOME_PATH: 'https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.4/css/all.min.css', // 图标库CDN 国内推荐BootCDN国外推荐 CloudFlare https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css
BACKGROUND_LIGHT: '#eeeeee', // use hex value, don't forget '#' e.g #fffefc
@@ -20,7 +22,7 @@ const BLOG = {
PATH: '', // leave this empty unless you want to deploy in a folder
POST_LIST_STYLE: 'page', // ['page','scroll] 文章列表样式:页码分页、单页滚动加载
POST_LIST_PREVIEW: false, // 是否在列表加载文章预览, 会被各主题中的同名配置覆盖,例:/themes/NEXT/config_next.js
POST_LIST_PREVIEW: false, // 是否在列表加载文章预览
POST_PREVIEW_LINES: 12, // 预览博客行数
POSTS_PER_PAGE: 6, // post counts per page
POSTS_SORT_BY: 'notion', // 排序方式 'date'按时间,'notion'由notion控制

50
components/DebugButton.js Normal file
View File

@@ -0,0 +1,50 @@
import { useGlobal } from '@/lib/global'
import * as ThemeMap from '@/themes'
import { useState } from 'react'
/**
*
* @returns 调试面板
*/
export function DebugButton () {
const [show, setShow] = useState(false)
const GlobalConfig = useGlobal()
const { theme, setTheme } = GlobalConfig
const allThemes = Object.keys(ThemeMap)
function toggleShow () {
setShow(!show)
}
/**
* 切换主题
*/
function changeTheme () {
const currentIndex = allThemes.indexOf(theme)
const newIndex = currentIndex < allThemes.length - 1 ? currentIndex + 1 : 0
setTheme(allThemes[newIndex])
}
return <>
<div className={`w-full text-sm font-sans h-72 p-5 bg-white fixed right-0 bottom-0 z-40 shadow-card duration-200 ${show ? '' : '-bottom-72'}`}>
<div className='flex space-x-1'>
<div className='font-bold'>当前主题:</div>
<div>{theme}</div>
</div>
<div className='flex space-x-1'>
<div className='font-bold'>所有主题:</div>
<div>{allThemes.join(',')}</div>
</div>
<div className='flex space-x-1'>
<div className='bg-blue-500 text-white p-2 cursor-pointer' onClick={changeTheme}>更换主题</div>
</div>
<div>
<div className='font-bold w-18'>所有配置:</div>
<div><p>{JSON.stringify(GlobalConfig)}</p></div>
</div>
</div>
<div className="fixed right-20 bottom-12 z-50">
<div className="bg-gray-50 text-sm dark:bg-black dark:text-white shadow-2xl p-2.5 rounded-md bg-opacity-75 cursor-pointer" onClick={toggleShow}>调试按钮</div>
</div>
</>
}

View File

@@ -5,7 +5,6 @@
"@/*": ["./*"],
"@/components/*": ["components/*"],
"@/data/*": ["data/*"],
"@/layouts/*": ["theme/*"],
"@/lib/*": ["lib/*"],
"@/styles/*": ["styles/*"]
}

View File

@@ -2,6 +2,7 @@ import lang from './lang'
import { useContext, createContext, useState } from 'react'
import Router from 'next/router'
import { initDarkMode } from './theme'
import BLOG from '@/blog.config'
const GlobalContext = createContext()
let hasInit = false
@@ -15,6 +16,8 @@ export function GlobalContextProvider ({ children }) {
const [locale, updateLocale] = useState(generateLocaleDict('en-US'))
const [isDarkMode, updateDarkMode] = useState(false)
const [onLoading, changeLoadingState] = useState(false)
const [theme, setTheme] = useState(BLOG.THEME)
Router.events.on('routeChangeStart', (...args) => {
changeLoadingState(true)
})
@@ -33,7 +36,7 @@ export function GlobalContextProvider ({ children }) {
}, 100)
return (
<GlobalContext.Provider value={{ onLoading, locale, isDarkMode, updateDarkMode }}>
<GlobalContext.Provider value={{ onLoading, locale, isDarkMode, updateDarkMode, theme, setTheme }}>
{children}
</GlobalContext.Provider>
)

View File

@@ -1,4 +1,5 @@
import { Layout404 } from '@/themes'
import { useGlobal } from '@/lib/global'
import * as ThemeMap from '@/themes'
/**
* 自定义404界面
@@ -7,5 +8,7 @@ import { Layout404 } from '@/themes'
*/
export default function Custom404 (props) {
return <Layout404 {...props}/>
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.Layout404 {...props}/>
}

View File

@@ -1,8 +1,9 @@
import BLOG from '@/blog.config'
import { getPostBlocks } from '@/lib/notion'
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutSlug } from '@/themes'
import Custom404 from '@/pages/404'
import { useGlobal } from '@/lib/global'
import Custom404 from './404'
import * as ThemeMap from '@/themes'
/**
* 根据notion的slug访问页面针对类型为Page的页面
@@ -10,10 +11,12 @@ import Custom404 from '@/pages/404'
* @returns
*/
const Slug = (props) => {
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
if (!props.post) {
return <Custom404 {...props} />
}
return <LayoutSlug {...props} showArticleInfo={false}/>
return <ThemeComponents.LayoutSlug {...props} showArticleInfo={false}/>
}
export async function getStaticPaths () {

View File

@@ -14,6 +14,7 @@ import 'prismjs/themes/prism-okaidia.css'
import 'katex/dist/katex.min.css'
import dynamic from 'next/dynamic'
import { GlobalContextProvider } from '@/lib/global'
import { DebugButton } from '@/components/DebugButton'
const Ackee = dynamic(() => import('@/components/Ackee'), { ssr: false })
const Gtag = dynamic(() => import('@/components/Gtag'), { ssr: false })
@@ -23,6 +24,7 @@ const GoogleAdsense = dynamic(() => import('@/components/GoogleAdsense'), { ssr:
const MyApp = ({ Component, pageProps }) => {
return (
<GlobalContextProvider>
{BLOG.DEBUG_BUTTON && <DebugButton/>}
{BLOG.ANALYTICS_ACKEE_TRACKER && <Ackee />}
{BLOG.ANALYTICS_GOOGLE_ID && <Gtag />}
{JSON.parse(BLOG.ANALYTICS_BUSUANZI_ENABLE) && <Busuanzi/>}

View File

@@ -1,6 +1,13 @@
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import React from 'react'
import { LayoutArchive } from '@/themes'
import { useGlobal } from '@/lib/global'
import * as ThemeMap from '@/themes'
const ArchiveIndex = (props) => {
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutArchive {...props}/>
}
export async function getStaticProps () {
const { allPosts, categories, tags, postCount, customNav } =
@@ -18,8 +25,4 @@ export async function getStaticProps () {
}
}
const ArchiveIndex = (props) => {
return <LayoutArchive {...props}/>
}
export default ArchiveIndex

View File

@@ -1,8 +1,9 @@
import BLOG from '@/blog.config'
import { getPostBlocks } from '@/lib/notion'
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutSlug } from '@/themes'
import Custom404 from '@/pages/404'
import { useGlobal } from '@/lib/global'
import Custom404 from '../404'
import * as ThemeMap from '@/themes'
/**
* 根据notion的slug访问页面
@@ -10,10 +11,12 @@ import Custom404 from '@/pages/404'
* @returns
*/
const Slug = (props) => {
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
if (!props.post) {
return <Custom404 {...props} />
}
return <LayoutSlug {...props} showArticleInfo={true}/>
return <ThemeComponents.LayoutSlug {...props} showArticleInfo={true}/>
}
export async function getStaticPaths () {

View File

@@ -1,9 +1,12 @@
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import React from 'react'
import { LayoutCategory } from '@/themes'
import { useGlobal } from '@/lib/global'
import * as ThemeMap from '@/themes'
export default function Category (props) {
return <LayoutCategory {...props} />
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutCategory {...props} />
}
export async function getStaticProps ({ params }) {

View File

@@ -1,9 +1,12 @@
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import React from 'react'
import { LayoutCategoryIndex } from '@/themes'
import { useGlobal } from '@/lib/global'
import * as ThemeMap from '@/themes'
export default function Category (props) {
return <LayoutCategoryIndex {...props}/>
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutCategoryIndex {...props}/>
}
export async function getStaticProps () {

View File

@@ -1,10 +1,12 @@
import BLOG from '@/blog.config'
import { getPostBlocks } from '@/lib/notion'
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutIndex, THEME_CONFIG } from '@/themes'
import * as ThemeMap from '@/themes'
import { useGlobal } from '@/lib/global'
const Index = (props) => {
return <LayoutIndex {...props}/>
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutIndex {...props}/>
}
export async function getStaticProps () {
@@ -26,7 +28,7 @@ export async function getStaticProps () {
BLOG.POSTS_PER_PAGE * (page - 1),
BLOG.POSTS_PER_PAGE * page
)
if (THEME_CONFIG.POST_LIST_PREVIEW || BLOG.POST_LIST_PREVIEW) {
if (BLOG.POST_LIST_PREVIEW) {
for (const i in postsToShow) {
const post = postsToShow[i]
const blockMap = await getPostBlocks(post.id, 'slug', BLOG.POST_PREVIEW_LINES)

View File

@@ -1,14 +1,17 @@
import BLOG from '@/blog.config'
import { getPostBlocks } from '@/lib/notion'
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutPage, THEME_CONFIG } from '@/themes'
import Custom404 from '@/pages/404'
import { useGlobal } from '@/lib/global'
import Custom404 from '../404'
import * as ThemeMap from '@/themes'
const Page = (props) => {
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
if (!props?.meta) {
return <Custom404 {...props} />
}
return <LayoutPage {...props} />
return <ThemeComponents.LayoutPage {...props} />
}
export async function getStaticPaths () {
@@ -43,8 +46,7 @@ export async function getStaticProps ({ params: { page } }) {
BLOG.POSTS_PER_PAGE * (page - 1),
BLOG.POSTS_PER_PAGE * page
)
// 加载预览
if (THEME_CONFIG.POST_LIST_PREVIEW || BLOG.POST_LIST_PREVIEW) {
if (BLOG.POST_LIST_PREVIEW) {
for (const i in postsToShow) {
const post = postsToShow[i]
const blockMap = await getPostBlocks(post.id, 'slug', BLOG.POST_PREVIEW_LINES)

View File

@@ -1,8 +1,22 @@
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutSearch } from '@/themes'
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
import { getDataFromCache } from '@/lib/cache/cache_manager'
import * as ThemeMap from '@/themes'
const Index = (props) => {
const { keyword } = props
const { locale } = useGlobal()
const meta = {
title: `${keyword || ''} | ${locale.NAV.SEARCH} | ${BLOG.TITLE} `,
description: BLOG.DESCRIPTION,
type: 'website'
}
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutSearch {...props} meta={meta} currentSearch={keyword} />
}
/**
* 服务端搜索
@@ -33,17 +47,6 @@ export async function getServerSideProps ({ params: { keyword } }) {
}
}
const Index = (props) => {
const { keyword } = props
const { locale } = useGlobal()
const meta = {
title: `${keyword || ''} | ${locale.NAV.SEARCH} | ${BLOG.TITLE} `,
description: BLOG.DESCRIPTION,
type: 'website'
}
return <LayoutSearch {...props} meta={meta} currentSearch={keyword} />
}
/**
* 将对象的指定字段拼接到字符串
* @param sourceTextArray

View File

@@ -1,33 +1,8 @@
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutSearch } from '@/themes'
import BLOG from '@/blog.config'
import { useGlobal } from '@/lib/global'
import { useRouter } from 'next/router'
/**
* 浏览器前端搜索
*/
export async function getStaticProps () {
const {
allPosts,
categories,
tags,
postCount,
latestPosts,
customNav
} = await getGlobalNotionData({ from: 'search-props', pageType: ['Post'] })
return {
props: {
posts: allPosts,
tags,
categories,
postCount,
latestPosts,
customNav
},
revalidate: 1
}
}
import * as ThemeMap from '@/themes'
const Search = (props) => {
const { posts } = props
@@ -51,7 +26,29 @@ const Search = (props) => {
description: BLOG.DESCRIPTION,
type: 'website'
}
return <LayoutSearch {...props} posts={filteredPosts} meta={meta} currentSearch={searchKey} />
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutSearch {...props} posts={filteredPosts} meta={meta} currentSearch={searchKey} />
}
/**
* 浏览器前端搜索
*/
export async function getStaticProps () {
const { allPosts, categories, tags, postCount, latestPosts, customNav } = await getGlobalNotionData({ from: 'search-props', pageType: ['Post'] })
return {
props: {
posts: allPosts,
tags,
categories,
postCount,
latestPosts,
customNav
},
revalidate: 1
}
}
function getSearchKey () {

View File

@@ -1,8 +1,11 @@
import { useGlobal } from '@/lib/global'
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import { LayoutTag } from '@/themes'
import * as ThemeMap from '@/themes'
const Tag = (props) => {
return <LayoutTag {...props} />
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutTag {...props} />
}
export async function getStaticProps ({ params }) {

View File

@@ -1,9 +1,12 @@
import { getGlobalNotionData } from '@/lib/notion/getNotionData'
import React from 'react'
import { LayoutTagIndex } from '@/themes'
import { useGlobal } from '@/lib/global'
import * as ThemeMap from '@/themes'
const TagIndex = (props) => {
return <LayoutTagIndex {...props} />
const { theme } = useGlobal()
const ThemeComponents = ThemeMap[theme]
return <ThemeComponents.LayoutTagIndex {...props} />
}
export async function getStaticProps () {

View File

@@ -992,7 +992,7 @@ svg.notion-page-icon {
.notion-board-header {
display: flex;
position: absolute;
z-index: 82;
z-index: 30;
height: 44px;
min-width: 100%;
}
@@ -1749,7 +1749,7 @@ pre[class*='language-'] {
.notion-table-header {
display: flex;
position: absolute;
z-index: 82;
z-index:30;
height: 33px;
color: var(--fg-color-3);
min-width: var(--notion-max-width);

View File

@@ -1,4 +1,4 @@
import LayoutBase from '../Empty/LayoutBase'
import LayoutBase from './LayoutBase'
export const LayoutPage = (props) => {
const { page } = props

View File

@@ -1,12 +1,25 @@
import CONFIG_EMPTY from './config_empty'
export { CONFIG_EMPTY as THEME_CONFIG }
export { LayoutIndex } from './LayoutIndex'
export { LayoutSearch } from './LayoutSearch'
export { LayoutArchive } from './LayoutArchive'
export { LayoutSlug } from './LayoutSlug'
export { Layout404 } from './Layout404'
export { LayoutCategory } from './LayoutCategory'
export { LayoutCategoryIndex } from './LayoutCategoryIndex'
export { LayoutPage } from './LayoutPage'
export { LayoutTag } from './LayoutTag'
export { LayoutTagIndex } from './LayoutTagIndex'
import { LayoutIndex } from './LayoutIndex'
import { LayoutSearch } from './LayoutSearch'
import { LayoutArchive } from './LayoutArchive'
import { LayoutSlug } from './LayoutSlug'
import { Layout404 } from './Layout404'
import { LayoutCategory } from './LayoutCategory'
import { LayoutCategoryIndex } from './LayoutCategoryIndex'
import { LayoutPage } from './LayoutPage'
import { LayoutTag } from './LayoutTag'
import { LayoutTagIndex } from './LayoutTagIndex'
export {
CONFIG_EMPTY as THEME_CONFIG,
LayoutIndex,
LayoutSearch,
LayoutArchive,
LayoutSlug,
Layout404,
LayoutCategory,
LayoutCategoryIndex,
LayoutPage,
LayoutTag,
LayoutTagIndex
}

View File

@@ -1,12 +1,25 @@
import CONFIG_FUKA from './config_fuka'
export { CONFIG_FUKA as THEME_CONFIG }
export { LayoutIndex } from './LayoutIndex'
export { LayoutSearch } from './LayoutSearch'
export { LayoutArchive } from './LayoutArchive'
export { LayoutSlug } from './LayoutSlug'
export { Layout404 } from './Layout404'
export { LayoutCategory } from './LayoutCategory'
export { LayoutCategoryIndex } from './LayoutCategoryIndex'
export { LayoutPage } from './LayoutPage'
export { LayoutTag } from './LayoutTag'
export { LayoutTagIndex } from './LayoutTagIndex'
import { LayoutIndex } from './LayoutIndex'
import { LayoutSearch } from './LayoutSearch'
import { LayoutArchive } from './LayoutArchive'
import { LayoutSlug } from './LayoutSlug'
import { Layout404 } from './Layout404'
import { LayoutCategory } from './LayoutCategory'
import { LayoutCategoryIndex } from './LayoutCategoryIndex'
import { LayoutPage } from './LayoutPage'
import { LayoutTag } from './LayoutTag'
import { LayoutTagIndex } from './LayoutTagIndex'
export {
CONFIG_FUKA as THEME_CONFIG,
LayoutIndex,
LayoutSearch,
LayoutArchive,
LayoutSlug,
Layout404,
LayoutCategory,
LayoutCategoryIndex,
LayoutPage,
LayoutTag,
LayoutTagIndex
}

View File

@@ -112,7 +112,6 @@ const TopNav = (props) => {
</div>
</Collapse>
</div>
</div>)
}

View File

@@ -1,12 +1,25 @@
import CONFIG_HEXO from './config_hexo'
export { LayoutIndex } from './LayoutIndex'
export { LayoutSearch } from './LayoutSearch'
export { LayoutArchive } from './LayoutArchive'
export { LayoutSlug } from './LayoutSlug'
export { Layout404 } from './Layout404'
export { LayoutCategory } from './LayoutCategory'
export { LayoutCategoryIndex } from './LayoutCategoryIndex'
export { LayoutPage } from './LayoutPage'
export { LayoutTag } from './LayoutTag'
export { LayoutTagIndex } from './LayoutTagIndex'
export { CONFIG_HEXO as THEME_CONFIG }
import { LayoutIndex } from './LayoutIndex'
import { LayoutSearch } from './LayoutSearch'
import { LayoutArchive } from './LayoutArchive'
import { LayoutSlug } from './LayoutSlug'
import { Layout404 } from './Layout404'
import { LayoutCategory } from './LayoutCategory'
import { LayoutCategoryIndex } from './LayoutCategoryIndex'
import { LayoutPage } from './LayoutPage'
import { LayoutTag } from './LayoutTag'
import { LayoutTagIndex } from './LayoutTagIndex'
export {
CONFIG_HEXO as THEME_CONFIG,
LayoutIndex,
LayoutSearch,
LayoutArchive,
LayoutSlug,
Layout404,
LayoutCategory,
LayoutCategoryIndex,
LayoutPage,
LayoutTag,
LayoutTagIndex
}

View File

@@ -1,6 +1,6 @@
import Link from 'next/link'
import React from 'react'
import JumpToTopButton from '@/themes/Medium/components/JumpToTopButton'
import JumpToTopButton from './JumpToTopButton'
export default function BottomMenuBar ({ className }) {
return (

View File

@@ -1,6 +1,6 @@
import LogoBar from '@/themes/Medium/components/LogoBar'
import Link from 'next/link'
import { useRouter } from 'next/router'
import LogoBar from './LogoBar'
/**
* 顶部导航栏 + 菜单

View File

@@ -1,12 +1,25 @@
import CONFIG_MEDIUM from './config_medium'
export { CONFIG_MEDIUM as THEME_CONFIG }
export { LayoutIndex } from './LayoutIndex'
export { LayoutSearch } from './LayoutSearch'
export { LayoutArchive } from './LayoutArchive'
export { LayoutSlug } from './LayoutSlug'
export { Layout404 } from './Layout404'
export { LayoutCategory } from './LayoutCategory'
export { LayoutCategoryIndex } from './LayoutCategoryIndex'
export { LayoutPage } from './LayoutPage'
export { LayoutTag } from './LayoutTag'
export { LayoutTagIndex } from './LayoutTagIndex'
import { LayoutIndex } from './LayoutIndex'
import { LayoutSearch } from './LayoutSearch'
import { LayoutArchive } from './LayoutArchive'
import { LayoutSlug } from './LayoutSlug'
import { Layout404 } from './Layout404'
import { LayoutCategory } from './LayoutCategory'
import { LayoutCategoryIndex } from './LayoutCategoryIndex'
import { LayoutPage } from './LayoutPage'
import { LayoutTag } from './LayoutTag'
import { LayoutTagIndex } from './LayoutTagIndex'
export {
CONFIG_MEDIUM as THEME_CONFIG,
LayoutIndex,
LayoutSearch,
LayoutArchive,
LayoutSlug,
Layout404,
LayoutCategory,
LayoutCategoryIndex,
LayoutPage,
LayoutTag,
LayoutTagIndex
}

View File

@@ -1,12 +1,25 @@
import CONFIG_NEXT from './config_next'
export { CONFIG_NEXT as THEME_CONFIG }
export { LayoutIndex } from './LayoutIndex'
export { LayoutSearch } from './LayoutSearch'
export { LayoutArchive } from './LayoutArchive'
export { LayoutSlug } from './LayoutSlug'
export { Layout404 } from './Layout404'
export { LayoutCategory } from './LayoutCategory'
export { LayoutCategoryIndex } from './LayoutCategoryIndex'
export { LayoutPage } from './LayoutPage'
export { LayoutTag } from './LayoutTag'
export { LayoutTagIndex } from './LayoutTagIndex'
import { LayoutIndex } from './LayoutIndex'
import { LayoutSearch } from './LayoutSearch'
import { LayoutArchive } from './LayoutArchive'
import { LayoutSlug } from './LayoutSlug'
import { Layout404 } from './Layout404'
import { LayoutCategory } from './LayoutCategory'
import { LayoutCategoryIndex } from './LayoutCategoryIndex'
import { LayoutPage } from './LayoutPage'
import { LayoutTag } from './LayoutTag'
import { LayoutTagIndex } from './LayoutTagIndex'
export {
CONFIG_NEXT as THEME_CONFIG,
LayoutIndex,
LayoutSearch,
LayoutArchive,
LayoutSlug,
Layout404,
LayoutCategory,
LayoutCategoryIndex,
LayoutPage,
LayoutTag,
LayoutTagIndex
}

View File

@@ -2,8 +2,15 @@
* 修改 from 后面的路径,实现主题切换
*/
// export * from './Empty' // 空主题
// export * from './NEXT'
// export * from './Fukasawa'
export * from './Hexo'
// export * from './Medium'
import * as next from './next'
import * as fukasawa from './fukasawa'
import * as hexo from './hexo'
import * as medium from './medium'
import * as empty from './empty'
export {
next,
fukasawa,
hexo,
medium,
empty
}