Skip to content

Commit

Permalink
版本3.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed May 7, 2022
1 parent 4cd93f2 commit f219046
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
NEXT_PUBLIC_VERSION=3.3.2
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env.local
# .env.local # 版本号放在此环境变量中
.env.development.local
.env.test.local
.env.production.local
Expand Down
2 changes: 1 addition & 1 deletion blog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const BLOG = {
process.env.NEXT_PUBLIC_DESCRIPTION || '这是一个由NotionNext生成的站点', // 站点描述,被notion中的页面描述覆盖

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)
VERSION: '3.3.1' // 版本号
VERSION: process.env.NEXT_PUBLIC_VERSION // 版本号
}

module.exports = BLOG
20 changes: 11 additions & 9 deletions components/NotionPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,19 @@ const NotionPage = ({ post }) => {
addWatch4Dom()
}, [])
setTimeout(() => {
// 将相册gallery下的图片加入放大功能
const imgList = document?.querySelectorAll('.notion-collection-card-cover img')
if (imgList && zoomRef.current) {
for (let i = 0; i < imgList.length; i++) {
(zoomRef.current).attach(imgList[i])
if (typeof document !== 'undefined') {
// 将相册gallery下的图片加入放大功能
const imgList = document.querySelectorAll('.notion-collection-card-cover img')
if (imgList && zoomRef.current) {
for (let i = 0; i < imgList.length; i++) {
(zoomRef.current).attach(imgList[i])
}
}
}

const cards = document?.getElementsByClassName('notion-collection-card')
for (const e of cards) {
e.removeAttribute('href')
const cards = document.getElementsByClassName('notion-collection-card')
for (const e of cards) {
e.removeAttribute('href')
}
}
}, 800)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "notion-next",
"version": "3.3.1",
"version": "3.3.2",
"homepage": "https://github.com/tangly1024/NotionNext.git",
"license": "MIT",
"repository": {
Expand Down

0 comments on commit f219046

Please sign in to comment.