forked from tangly1024/NotionNext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c68d1a
commit 3f2de9e
Showing
54 changed files
with
284 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,108 @@ | ||
const BLOG = { | ||
title: '小唐笔记', // 站点标题 | ||
description: '分享编程技术与记录生活', // 站点描述 | ||
author: 'tangly1024', // 作者 | ||
bio: '一个普通的干饭人🍚', // 作者简介 | ||
email: '[email protected]', // 联系邮箱 | ||
link: 'https://tangly1024.com', // 网站地址 | ||
keywords: ['Notion', '写作', '博客'], // 网站关键词 | ||
lang: 'zh-CN', // ['zh-CN','en-US'] default lang => see /lib/lang.js for more. | ||
beian: '闽ICP备20010331号', // 备案号 | ||
notionPageId: process.env.NOTION_PAGE_ID || 'bee1fccfa3bd47a1a7be83cc71372d83', // Important page_id!!! | ||
notionAccessToken: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public | ||
appearance: 'auto', // ['light', 'dark', 'auto'], | ||
font: 'font-serif tracking-wider subpixel-antialiased', // 文章字体 ['font-sans', 'font-serif', 'font-mono'] @see https://www.tailwindcss.cn/docs/font-family | ||
lightBackground: '#eeeeee', // use hex value, don't forget '#' e.g #fffefc | ||
darkBackground: '#111827', // use hex value, don't forget '#' | ||
path: '', // leave this empty unless you want to deploy in a folder | ||
since: 2020, // if leave this empty, current year will be used. | ||
postListStyle: 'page', // ['page','scroll] 文章列表样式:页码分页、单页滚动加载 | ||
postsPerPage: 6, // post counts per page | ||
previewLines: 12, // 预览博客行数 | ||
sortByDate: false, | ||
socialLink: { // 社交链接,如不需要展示可以留空白,例如 weibo:'' | ||
weibo: 'https://weibo.com/tangly1024', | ||
twitter: 'https://twitter.com/troy1024_1', | ||
github: 'https://github.com/tangly1024', | ||
telegram: 'https://t.me/tangly_1024' | ||
}, | ||
comment: { // 评论插件,支持 gitalk, utterances, cusdis | ||
provider: 'gitalk', // 不需要则留空白 | ||
gitalkConfig: { | ||
repo: 'NotionNext', // The repository of store comments | ||
owner: 'tangly1024', | ||
admin: ['tangly1024'], | ||
clientID: process.env.GITALK_ID || 'be7864a16b693e256f8f', | ||
clientSecret: process.env.GITALK_SECRET || 'dbd0f6d9ceea8940f6ed20936b415274b8fe66a2', | ||
distractionFreeMode: false | ||
}, | ||
cusdisConfig: { | ||
appId: '445ba48e-f751-487f-b22f-cdbe3310d28f', // data-app-id | ||
host: 'https://cusdis.com', // data-host, change this if you're using self-hosted version | ||
scriptSrc: 'https://cusdis.com/js/cusdis.es.js' // change this if you're using self-hosted version | ||
}, | ||
utterancesConfig: { | ||
repo: 'tangly1024/NotionNext' | ||
}, | ||
gitter: '', // gitter聊天室 | ||
DaoVoiceId: '', // DaoVoice http://dashboard.daovoice.io/get-started | ||
TidioId: '' // https://www.tidio.com/ | ||
}, | ||
// --- 高级设置 | ||
analytics: { // 文章访问量统计 | ||
busuanzi: true, // 展示网站阅读量、访问数 see http://busuanzi.ibruce.info/ | ||
provider: 'ga', // 支持 Google Analytics and Ackee, please fill with 'ga' or 'ackee', leave it empty to disable it. | ||
baiduAnalytics: 'f683ef76f06bb187cbed5546f6f28f28', // e.g only need xxxxx -> https://hm.baidu.com/hm.js?[xxxxx] | ||
cnzzAnalytics: '', // 站长统计id only need xxxxxxxx -> https://s9.cnzz.com/z_stat.php?id=[xxxxxxxx]&web_id=[xxxxxxx] | ||
gaConfig: { | ||
measurementId: 'G-68EK0W049N' // e.g: G-XXXXXXXXXX | ||
}, | ||
ackeeConfig: { | ||
tracker: '', // e.g 'https://ackee.tangly1024.net/tracker.js' | ||
dataAckeeServer: '', // e.g https://ackee.tangly1024.net , don't end with a slash | ||
domainId: '' // e.g '0e2257a8-54d4-4847-91a1-0311ea48cc7b' | ||
} | ||
}, | ||
seo: { | ||
googleSiteVerification: '' // Remove the value or replace it with your own google site verification code | ||
}, | ||
googleAdsenseId: 'ca-pub-2708419466378217', // 谷歌广告ID | ||
// 注: 配置文件可以读取Vercel的环境变量,配置方式参考:https://docs.tangly1024.com/zh/features/personality | ||
const BLOG = mergeDeep(process.env, { | ||
TITLE: 'NotionNext BLOG', // 站点标题 | ||
DESCRIPTION: '这是一个由NotionNext生成的站点', // 站点描述 | ||
AUTHOR: 'tangly1024', // 作者 | ||
BIO: '一个普通的干饭人🍚', // 作者简介 | ||
LINK: 'https://tangly1024.com', // 网站地址 | ||
NOTION_PAGE_ID: '02ab3b8678004aa69e9e415905ef32a5', // Important page_id!!!Duplicate Template from https://www.notion.so/tanghh/02ab3b8678004aa69e9e415905ef32a5 | ||
NOTION_ACCESS_TOKEN: '', // Useful if you prefer not to make your database public | ||
KEYWORDS: 'Notion, 博客', // 网站关键词 英文逗号隔开 | ||
LANG: 'zh-CN', // e.g 'zh-CN','en-US' see /lib/lang.js for more. | ||
BEI_AN: '', // 备案号 闽ICP备XXXXXXX | ||
SINCE: 2020, // if leave this empty, current year will be used. | ||
|
||
APPEARANCE: 'auto', // ['light', 'dark', 'auto'], | ||
FONT: 'font-serif tracking-wider subpixel-antialiased', // 文章字体 ['font-sans', 'font-serif', 'font-mono'] @see https://www.tailwindcss.cn/docs/font-family | ||
BACKGROUND_LIGHT: '#eeeeee', // use hex value, don't forget '#' e.g #fffefc | ||
BACKGROUND_DARK: '#111827', // use hex value, don't forget '#' | ||
PATH: '', // leave this empty unless you want to deploy in a folder | ||
|
||
POST_LIST_STYLE: 'page', // ['page','scroll] 文章列表样式:页码分页、单页滚动加载 | ||
POST_PREVIEW_LINES: 12, // 预览博客行数 | ||
POSTS_PER_PAGE: 6, // post counts per page | ||
POSTS_SORT_BY_DATE: false, // 是否强制按时间排序,否则默认由notion排序文章 | ||
|
||
// 社交链接,不需要可留空白,例如 CONTACT_WEIBO:'' | ||
CONTACT_EMAIL: '[email protected]', // 联系邮箱 | ||
CONTACT_WEIBO: 'https://weibo.com/tangly1024', | ||
CONTACT_TWITTER: 'https://twitter.com/troy1024_1', | ||
CONTACT_GITHUB: 'https://github.com/tangly1024', | ||
CONTACT_TELEGRAM: 'https://t.me/tangly_1024', | ||
|
||
COMMENT_PROVIDER: '', // 支持 gitalk, utterances, cusdis | ||
|
||
COMMENT_GITALK_REPO: '', // e.g NotionNext | ||
COMMENT_GITALK_OWNER: '', // e.g tangly1024 | ||
COMMENT_GITALK_ADMIN: '', // e.g 'tangly1024' | ||
COMMENT_GITALK_CLIENT_ID: '', | ||
COMMENT_GITALK_CLIENT_SECRET: '', | ||
COMMENT_GITALK_DISTRACTION_FREE_MODE: false, | ||
|
||
COMMENT_CUSDIS_APP_ID: '', // data-app-id | ||
COMMENT_CUSDIS_HOST: 'https://cusdis.com', // data-host, change this if you're using self-hosted version | ||
COMMENT_CUSDIS_SCRIPT_SRC: 'https://cusdis.com/js/cusdis.es.js', // change this if you're using self-hosted version | ||
|
||
COMMENT_UTTERRANCES_REPO: '', // e.g 'tangly1024/NotionNext' | ||
|
||
COMMENT_GITTER_ENABLE: false, // gitter see https://gitter.im/ | ||
COMMENT_GITTER_ROOM: '', // gitter聊天室 | ||
|
||
COMMENT_DAO_VOICE_ENABLE: false, // DaoVoice see http://dashboard.daovoice.io/get-started | ||
COMMENT_DAO_VOICE_ID: '', // DaoVoice http://dashboard.daovoice.io/get-started | ||
|
||
COMMENT_TIDIO_ENABLE: false, // https://www.tidio.com/ | ||
COMMENT_TIDIO_ID: '', // [tidio_id] -> //code.tidio.co/[tidio_id].js | ||
|
||
// 站点统计 | ||
|
||
ANALYTICS_BUSUANZI_ENABLE: true, // 展示网站阅读量、访问数 see http://busuanzi.ibruce.info/ | ||
|
||
ANALYTICS_BAIDU_ENABLE: false, | ||
ANALYTICS_BAIDU_ID: '', // e.g 只需要填写百度统计的id,[baidu_id] -> https://hm.baidu.com/hm.js?[baidu_id] | ||
|
||
ANALYTICS_CNZZ_ENABLE: false, | ||
ANALYTICS_CNZZ_ID: '', // 只需要填写站长统计的id, [cnzz_id] -> https://s9.cnzz.com/z_stat.php?id=[cnzz_id]&web_id=[cnzz_id] | ||
|
||
ANALYTICS_GOOGLE_ENABLE: false, | ||
ANALYTICS_GOOGLE_ID: '', // 谷歌Analytics的id e.g: G-XXXXXXXXXX | ||
|
||
ANALYTICS_ACKEE_ENABLE: false, | ||
ANALYTICS_ACKEE_TRACKER: '', // e.g 'https://ackee.tangly1024.net/tracker.js' | ||
ANALYTICS_ACKEE_DATA_SERVER: '', // e.g https://ackee.tangly1024.net , don't end with a slash | ||
ANALYTICS_ACKEE_DOMAIN_ID: '', // e.g '0e2257a8-54d4-4847-91a1-0311ea48cc7b' | ||
|
||
SEO_GOOGLE_SITE_VERIFICATION: '', // Remove the value or replace it with your own google site verification code | ||
|
||
GOOGLE_ADSENSE_ENABLE: false, | ||
GOOGLE_ADSENSE_ID: process.env.GOOGLE_AD_ID, // 谷歌广告ID | ||
isProd: process.env.VERCEL_ENV === 'production'// distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) | ||
}) | ||
|
||
/** | ||
* 深度合并两个对象 | ||
* @param target | ||
* @param sources | ||
*/ | ||
function mergeDeep (target, ...sources) { | ||
if (!sources.length) return target | ||
const source = sources.shift() | ||
|
||
if (isObject(target) && isObject(source)) { | ||
for (const key in source) { | ||
if (isObject(source[key])) { | ||
if (!target[key]) Object.assign(target, { [key]: {} }) | ||
mergeDeep(target[key], source[key]) | ||
} else { | ||
Object.assign(target, { [key]: source[key] }) | ||
} | ||
} | ||
} | ||
return mergeDeep(target, ...sources) | ||
} | ||
|
||
function isObject (item) { | ||
return (item && typeof item === 'object' && !Array.isArray(item)) | ||
} | ||
// export default BLOG | ||
|
||
module.exports = BLOG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.