feature: 切换主题

This commit is contained in:
tangly1024
2022-01-15 21:38:47 +08:00
parent a6903b1d52
commit 018af8fe7f
24 changed files with 101 additions and 109 deletions

View File

@@ -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 <Custom404 />
}
return <ArticleLayout {...props}/>
return <LayoutSlug {...props}/>
}
export async function getStaticPaths () {
@@ -69,7 +69,7 @@ export async function getStaticProps ({ params: { slug } }) {
/**
*
* @param {获取文章推荐文章} post
* @param post
* @param {*} allPosts
* @param {*} count
* @returns