mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-04 23:16:53 +00:00
站点信息读取Notion数据
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import Link from 'next/link'
|
||||
import LayoutBase from './LayoutBase'
|
||||
|
||||
export const LayoutArchive = props => {
|
||||
const { posts } = props
|
||||
const { locale } = useGlobal()
|
||||
const postsSortByDate = Object.create(posts)
|
||||
|
||||
postsSortByDate.sort((a, b) => {
|
||||
@@ -14,12 +12,6 @@ export const LayoutArchive = props => {
|
||||
return dateB - dateA
|
||||
})
|
||||
|
||||
const meta = {
|
||||
title: `${locale.NAV.ARCHIVE} | ${BLOG.TITLE}`,
|
||||
description: BLOG.DESCRIPTION,
|
||||
type: 'website'
|
||||
}
|
||||
|
||||
const archivePosts = {}
|
||||
|
||||
postsSortByDate.forEach(post => {
|
||||
@@ -31,7 +23,7 @@ export const LayoutArchive = props => {
|
||||
}
|
||||
})
|
||||
return (
|
||||
<LayoutBase {...props} meta={meta}>
|
||||
<LayoutBase {...props}>
|
||||
<div className="mb-10 pb-20 md:p-12 p-3 min-h-full">
|
||||
{Object.keys(archivePosts).map(archiveTitle => (
|
||||
<div key={archiveTitle}>
|
||||
|
||||
Reference in New Issue
Block a user