Skip to content

Commit

Permalink
menu跳转
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Apr 16, 2024
1 parent 6411a78 commit bc29825
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/db/getSiteData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit bc29825

Please sign in to comment.