menu跳转

This commit is contained in:
tangly1024.com
2024-04-16 15:02:00 +08:00
parent 6411a788c6
commit bc298255e2

View File

@@ -9,7 +9,6 @@ import { getPostBlocks, getSingleBlock } from '@/lib/notion/getPostBlocks'
import { compressImage, mapImgUrl } from '@/lib/notion/mapImage'
import { deepClone } from '@/lib/utils'
import { idToUuid } from 'notion-utils'
import { siteConfig } from '../config'
import { extractLangId, extractLangPrefix } from '../utils/pageId'
export { getAllTags } from '../notion/getAllTags'
@@ -193,10 +192,7 @@ function getCustomMenu({ collectionData, NOTION_CONFIG }) {
if (menuPages && menuPages.length > 0) {
menuPages.forEach(e => {
e.show = true
if (
e?.slug?.indexOf('http') === 0 &&
e?.slug?.indexOf(siteConfig('LINK', BLOG.LINK, NOTION_CONFIG)) < 0
) {
if (e?.slug?.indexOf('http') === 0) {
e.target = '_blank'
e.to = e.slug
} else {