mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-27 15:10:00 +00:00
整理lib目录
This commit is contained in:
@@ -2,16 +2,19 @@ import BLOG from '@/blog.config'
|
||||
import { getDataFromCache, setDataToCache } from '@/lib/cache/cache_manager'
|
||||
import { getPostBlocks, getSingleBlock } from '@/lib/notion/getPostBlocks'
|
||||
import { idToUuid } from 'notion-utils'
|
||||
import { deepClone } from '../utils'
|
||||
import { getAllCategories } from './getAllCategories'
|
||||
import getAllPageIds from './getAllPageIds'
|
||||
import { getAllTags } from './getAllTags'
|
||||
import getPageProperties from './getPageProperties'
|
||||
import { compressImage, mapImgUrl } from './mapImage'
|
||||
import { getConfigMapFromConfigPage } from './getNotionConfig'
|
||||
import { deepClone } from '@/lib/utils'
|
||||
import { getAllCategories } from '@/lib/notion/getAllCategories'
|
||||
import getAllPageIds from '@/lib/notion/getAllPageIds'
|
||||
import { getAllTags } from '@/lib/notion/getAllTags'
|
||||
import getPageProperties from '@/lib/notion/getPageProperties'
|
||||
import { compressImage, mapImgUrl } from '@/lib/notion/mapImage'
|
||||
import { getConfigMapFromConfigPage } from '@/lib/notion/getNotionConfig'
|
||||
|
||||
export { getAllTags } from '../notion/getAllTags'
|
||||
export { getPostBlocks } from '../notion/getPostBlocks'
|
||||
|
||||
/**
|
||||
* 获取博客数据
|
||||
* 获取博客数据; 基于Notion实现
|
||||
* @param {*} pageId
|
||||
* @param {*} from
|
||||
* @param latestPostCount 截取最新文章数量
|
||||
@@ -5,7 +5,7 @@ import zhTW from './lang/zh-TW'
|
||||
import frFR from './lang/fr-FR'
|
||||
import trTR from './lang/tr-TR'
|
||||
import jaJP from './lang/ja-JP'
|
||||
import { getQueryVariable, isBrowser, mergeDeep } from './utils'
|
||||
import { getQueryVariable, isBrowser, mergeDeep } from '@/lib/utils'
|
||||
|
||||
/**
|
||||
* 在这里配置所有支持的语言
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
export { getAllTags } from './notion/getAllTags'
|
||||
export { getPostBlocks } from './notion/getPostBlocks'
|
||||
@@ -1,7 +1,7 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import getAllPageIds from './getAllPageIds'
|
||||
import getPageProperties from './getPageProperties'
|
||||
import { getNotionPageData } from '@/lib/notion/getNotionData'
|
||||
import { getNotionPageData } from '@/lib/db/getSiteData'
|
||||
import { delCacheData } from '@/lib/cache/cache_manager'
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { idToUuid } from 'notion-utils'
|
||||
import formatDate from '../formatDate'
|
||||
import formatDate from '../utils/formatDate'
|
||||
import { getPostBlocks } from './getPostBlocks'
|
||||
import { defaultMapImageUrl } from 'react-notion-x'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getTextContent, getDateValue } from 'notion-utils'
|
||||
import { NotionAPI } from 'notion-client'
|
||||
import BLOG from '@/blog.config'
|
||||
import formatDate from '../formatDate'
|
||||
import formatDate from '../utils/formatDate'
|
||||
// import { createHash } from 'crypto'
|
||||
import md5 from 'js-md5'
|
||||
import { mapImgUrl } from './mapImage'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const { loadExternalResource } = require('./utils');
|
||||
const { loadExternalResource } = require('../utils');
|
||||
|
||||
/**
|
||||
* WOWjs动画,结合animate.css使用很方便
|
||||
@@ -2,7 +2,7 @@ import fs from 'fs'
|
||||
import { Feed } from 'feed'
|
||||
import BLOG from '@/blog.config'
|
||||
import ReactDOMServer from 'react-dom/server'
|
||||
import { getPostBlocks } from './notion'
|
||||
import { getPostBlocks } from '@/lib/db/getSiteData'
|
||||
import NotionPage from '@/components/NotionPage'
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user