mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-30 15:10:11 +00:00
example主题添加目录
This commit is contained in:
@@ -5,6 +5,7 @@ import dynamic from 'next/dynamic'
|
||||
import Link from 'next/link'
|
||||
import CONFIG from '../config'
|
||||
import Announcement from './Announcement'
|
||||
import Catalog from './Catalog'
|
||||
const ExampleRecentComments = dynamic(
|
||||
() => import('./RecentCommentListForExample')
|
||||
)
|
||||
@@ -32,6 +33,16 @@ export const SideBar = props => {
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* 目录 */}
|
||||
{post?.toc && post?.toc.length > 2 && (
|
||||
<aside className='w-full rounded shadow overflow-hidden mb-6 pb-4'>
|
||||
<h3 className='text-sm bg-gray-100 text-gray-700 dark:bg-hexo-black-gray dark:text-gray-200 py-3 px-4 dark:border-hexo-black-gray border-b'>
|
||||
{locale.COMMON.TABLE_OF_CONTENTS}
|
||||
</h3>
|
||||
<Catalog toc={post?.toc} />
|
||||
</aside>
|
||||
)}
|
||||
|
||||
{/* 分类 */}
|
||||
<aside className='w-full rounded shadow overflow-hidden mb-6'>
|
||||
<h3 className='text-sm bg-gray-100 text-gray-700 dark:bg-hexo-black-gray dark:text-gray-200 py-3 px-4 dark:border-hexo-black-gray border-b'>
|
||||
|
||||
Reference in New Issue
Block a user