mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
fix
This commit is contained in:
@@ -109,7 +109,7 @@ export default function AlgoliaSearchModal({ cRef }) {
|
||||
|
||||
<div className='flex justify-between items-center'>
|
||||
<div className='text-2xl text-blue-600 font-bold'>搜索</div>
|
||||
<div><i class="text-gray-600 fa-solid fa-xmark p-1 cursor-pointer hover:text-blue-600" onClick={closeModal} ></i></div>
|
||||
<div><i className="text-gray-600 fa-solid fa-xmark p-1 cursor-pointer hover:text-blue-600" onClick={closeModal} ></i></div>
|
||||
</div>
|
||||
|
||||
<input type="text" placeholder="在这里输入搜索关键词..." onChange={(e) => handleInputChange(e)}
|
||||
|
||||
@@ -95,10 +95,8 @@ export async function getStaticPaths() {
|
||||
}
|
||||
}
|
||||
|
||||
export async function getStaticProps(p) {
|
||||
const { params } = p
|
||||
console.log('getStaticProps', p)
|
||||
let fullSlug = params.prefix
|
||||
export async function getStaticProps({ params: { prefix } }) {
|
||||
let fullSlug = prefix
|
||||
if (JSON.parse(BLOG.PSEUDO_STATIC)) {
|
||||
if (!fullSlug.endsWith('.html')) {
|
||||
fullSlug += '.html'
|
||||
@@ -113,7 +111,7 @@ export async function getStaticProps(p) {
|
||||
|
||||
// 处理非列表内文章的内信息
|
||||
if (!props?.post) {
|
||||
const pageId = params.PSEUDO_STATICprefix.slice(-1)[0]
|
||||
const pageId = prefix.slice(-1)[0]
|
||||
if (pageId.length >= 32) {
|
||||
const post = await getNotion(pageId)
|
||||
props.post = post
|
||||
|
||||
Reference in New Issue
Block a user