Skip to content

Commit

Permalink
Merge pull request #2 from tangly1024/main
Browse files Browse the repository at this point in the history
[pull] main from tangly1024:main
  • Loading branch information
fjay authored Dec 27, 2023
2 parents 50b0318 + 86c2330 commit 9703c1d
Show file tree
Hide file tree
Showing 56 changed files with 601 additions and 352 deletions.
3 changes: 2 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
NEXT_PUBLIC_VERSION=4.1.0
NEXT_PUBLIC_VERSION=4.1.2


# 可在此添加环境变量,去掉最左边的(# )注释即可
# Notion页面ID,必须
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@
- **图标**: [Fontawesome](https://fontawesome.com/v6/icons/)


## 🔗 友情链接
- [Elog](https://github.com/LetTTGACO/elog) Markdown 批量导出工具、开放式跨平台博客解决方案,随意组合写作平台(语雀/Notion/FlowUs/飞书)和博客平台(Hexo/Vitepress/Halo/Confluence/WordPress等)

## License

The MIT License.
6 changes: 6 additions & 0 deletions blog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ const BLOG = {
ANALYTICS_CNZZ_ID: process.env.NEXT_PUBLIC_ANALYTICS_CNZZ_ID || '', // 只需要填写站长统计的id, [cnzz_id] -> https://s9.cnzz.com/z_stat.php?id=[cnzz_id]&web_id=[cnzz_id]
ANALYTICS_GOOGLE_ID: process.env.NEXT_PUBLIC_ANALYTICS_GOOGLE_ID || '', // 谷歌Analytics的id e.g: G-XXXXXXXXXX

// 51la 站点统计 https://www.51.la/
ANALYTICS_51LA_ID: process.env.NEXT_PUBLIC_ANALYTICS_51LA_ID || '', // id,在51la后台获取 参阅 https://docs.tangly1024.com/article/notion-next-51-la
ANALYTICS_51LA_CK: process.env.NEXT_PUBLIC_ANALYTICS_51LA_CK || '', // ck,在51la后台获取

// Matomo 网站统计
MATOMO_HOST_URL: process.env.NEXT_PUBLIC_MATOMO_HOST_URL || '', // Matomo服务器地址,不带斜杠
MATOMO_SITE_ID: process.env.NEXT_PUBLIC_MATOMO_SITE_ID || '', // Matomo网站ID
Expand Down Expand Up @@ -398,12 +402,14 @@ const BLOG = {
IMG_LAZY_LOAD_PLACEHOLDER: process.env.NEXT_PUBLIC_IMG_LAZY_LOAD_PLACEHOLDER || 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==', // 懒加载占位图片地址,支持base64或url
IMG_URL_TYPE: process.env.NEXT_PUBLIC_IMG_TYPE || 'Notion', // 此配置已失效,请勿使用;AMAZON方案不再支持,仅支持Notion方案。 ['Notion','AMAZON'] 站点图片前缀 默认 Notion:(https://notion.so/images/xx) , AMAZON(https://s3.us-west-2.amazonaws.com/xxx)
IMG_SHADOW: process.env.NEXT_PUBLIC_IMG_SHADOW || false, // 文章图片是否自动添加阴影
IMG_COMPRESS_WIDTH: process.env.NEXT_PUBLIC_IMG_COMPRESS_WIDTH || 800, // Notion图片压缩宽度

// 开发相关
NOTION_ACCESS_TOKEN: process.env.NOTION_ACCESS_TOKEN || '', // Useful if you prefer not to make your database public
DEBUG: process.env.NEXT_PUBLIC_DEBUG || false, // 是否显示调试按钮
ENABLE_CACHE: process.env.ENABLE_CACHE || process.env.npm_lifecycle_event === 'build', // 缓存在开发调试和打包过程中选择性开启,正式部署开启此功能意义不大。
isProd: process.env.VERCEL_ENV === 'production', // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables) isProd: process.env.VERCEL_ENV === 'production' // distinguish between development and production environment (ref: https://vercel.com/docs/environment-variables#system-environment-variables)
BUNDLE_ANALYZER: process.env.ANALYZE === 'true' || false, // 是否展示编译依赖内容与大小
VERSION: process.env.NEXT_PUBLIC_VERSION // 版本号
}

Expand Down
12 changes: 12 additions & 0 deletions components/AOSAnimation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import AOS from 'aos'
import { isBrowser } from 'react-notion-x'

/**
* 加载滚动动画
* https://michalsnik.github.io/aos/
*/
export default function AOSAnimation() {
if (isBrowser) {
AOS.init()
}
}
6 changes: 5 additions & 1 deletion components/Comment.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dynamic from 'next/dynamic'
import Tabs from '@/components/Tabs'
import { isBrowser } from '@/lib/utils'
import { isBrowser, isSearchEngineBot } from '@/lib/utils'
import { useRouter } from 'next/router'
import Artalk from './Artalk'
import { siteConfig } from '@/lib/config'
Expand Down Expand Up @@ -73,6 +73,10 @@ const Comment = ({ siteInfo, frontMatter, className }) => {
const COMMENT_GITALK_CLIENT_ID = siteConfig('COMMENT_GITALK_CLIENT_ID')
const COMMENT_WEBMENTION_ENABLE = siteConfig('COMMENT_WEBMENTION_ENABLE')

if (isSearchEngineBot()) {
return null
}

// 当连接中有特殊参数时跳转到评论区
if (isBrowser && ('giscus' in router.query || router.query.target === 'comment')) {
setTimeout(() => {
Expand Down
6 changes: 5 additions & 1 deletion components/Equation.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ const katexSettings = {
strict: false
}

/**
* 数学公式
* @param {} param0
* @returns
*/
export const Equation = ({ block, math, inline = false, className, ...rest }) => {
// const { recordMap } = useNotionContext()
math = math || getBlockTitle(block, null)
if (!math) return null

Expand Down
Loading

1 comment on commit 9703c1d

@vercel
Copy link

@vercel vercel bot commented on 9703c1d Dec 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog-git-main-fjay.vercel.app
fjay.vercel.app
blog.fjay.top
blog-fjay.vercel.app

Please sign in to comment.