Skip to content

解决冲突#4080

Closed
cloud-oc wants to merge 283 commits into
notionnext-org:mainfrom
cloud-oc:main
Closed

解决冲突#4080
cloud-oc wants to merge 283 commits into
notionnext-org:mainfrom
cloud-oc:main

Conversation

@cloud-oc
Copy link
Copy Markdown
Collaborator

尽量按此模板PR内容,或粘贴相关的ISSUE链接。

已知问题

  1. (示例)版本号管理不规范
    • 版本号直接写在环境变量中,容易出错
    • 多处维护版本号,可能不一致

解决方案

  1. (示例)将版本号管理从 .env.local 迁移到 package.json
    • 统一从 package.json 读取版本号
    • 使用 IIFE 优雅处理版本号获取逻辑
    • 保持向后兼容,支持环境变量覆盖

改动收益

  1. (示例)更规范的版本管理
    • 统一从 package.json 读取
    • 保持与 npm 生态一致
    • 减少人为错误

具体改动

  1. (示例)blog.config.js
    • 移除原有的静态版本号配置
    • 在文件末尾添加动态版本号获取逻辑
    • 保持向后兼容,优先使用环境变量
    • 添加错误处理和默认值

测试确认

  • 本地开发环境测试通过
  • 生产环境构建测试通过
  • (如适用)版本号正确显示
  • (如适用)环境变量配置正常工作

用户文档(docs/user-guide/

若本 PR 修改 docs/user-guide/docs/developer/ 中与站长相关的说明,可勾选「不适用」并跳过本节。

  • 不适用(无文档改动)
  • 已按 维护工作流 自检
  • 路径符合 docs/user-guide/ 目录约定
  • 已更新 user-guide/README.md(新增/移动文章时)
  • 已更新 ARTICLE_INDEX.md(新 slug 或路径变更时)
  • 环境变量名与 conf/*.config.js 一致(若文档涉及配置)
  • 示例中无真实 Token、.env、私有 ID
  • 保留或更新了「原文链接」(若源自 docs.tangly1024.com)

文档说明(可选):对应官方 slug / URL、是否与功能 PR 配套

Changed THEME_SWITCH default value to true, making the theme switch button visible unless overridden by environment variable.
Enhanced the LoadingCover component with a cyberpunk/tech boot sequence, progress bar, and terminal logs. Updated the theme color to tech cyan (#00E3FF) in config. Applied sharp corners, tech-style button hover, and background grid patterns in style.js for a more cyberpunk aesthetic. Integrated the new LoadingCover into the main layout.
Enhanced the visual design of the Hero, Header, and LoadingCover components with new tech-themed decorations, updated color schemes, and improved animations. Added a forced 2.5s loading animation on initial mount for a 'system boot' effect. Adjusted layout logic to use the new loading state and improved overall user experience with modernized styles and interactive elements.
Replaces and restructures major blog components in the void theme. Removes legacy components such as BlogPostListPage, BlogPostListScroll, BlogPostArchive, and others, introducing new Endfield-style components: BlogListPage, BlogListScroll, BlogListArchive, PostMeta, PostLock, SideNav, and TitleBar. Updates BlogPostCard to a new design, and modifies Footer, Header, SearchInput, SideBar, config.js, index.js, and style.js to support the new layout and features. Adds a comprehensive README for the new theme structure and usage.
Updated the default theme from 'simple' to 'void' in blog.config.js to change the appearance of the blog when no theme is specified.
Deleted the README.md file for the Void theme, which contained documentation and usage instructions. This may indicate a move or replacement of documentation.
Visually overhauled the Endfield (Void) theme for a more technical, system log-inspired aesthetic. Updated BlogListArchive, BlogPostCard, PostMeta, SearchInput, SideBar, and main layout to use new 'void-frame' containers, improved accent colors, and technical decorations. Enhanced Notion content styling, added new grid/corner effects, and modernized typography and interactive elements for a cohesive, high-tech look.
Refactored all major theme components (BlogPostCard, Footer, Header, PostMeta, SideBar, SideNav) and global styles for a minimalist, light 'laboratory' look. Updated color palette to light backgrounds, dark text, and adjusted accent colors. Simplified UI elements, removed redundant headers, and improved layout spacing and hover effects. Enhanced navigation sidebar with hover expansion and author info reveal. Updated 404 page and content styles for better readability and modern appearance.
Updated TitleBar component to use Endfield (light industrial) style, replacing hardcoded colors with CSS variables and improving visual elements. Exported Footer as a named export for consistency.
Commented out unused imports in PostMeta.js and SideBar.js to clean up code. Updated LayoutTagIndex in index.js to use CSS variables for colors and improved tag styling for better theme consistency.
cloud-oc and others added 24 commits May 16, 2026 20:46
Copilot AI review requested due to automatic review settings May 19, 2026 05:35
@cloud-oc cloud-oc requested a review from tangly1024 as a code owner May 19, 2026 05:35
@cloud-oc cloud-oc closed this May 19, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

The PR is titled "解决冲突" (resolve conflicts) but, in addition to merge-conflict cleanup, it bundles a large set of personal-deployment customizations (author info, beian, Twikoo server, music playlist), a sweeping rework of the endspace theme (search highlight, archive page layout, menu refactor, dark-mode CSS stripped, Notion menu icons), and miscellaneous fixes (defensive null check in NotionPage.js, deletion of allPages from search props, Dockerfile patches copy). It also adds themes/endspace as a git submodule while simultaneously editing files inside that path, and reshuffles package.json in a way that introduces duplicate dependency keys.

Changes:

  • Endspace theme rewrite: new menu.js, NotionMenuIcon.js, searchHighlight.js; LayoutArchive merged search/categories/tags; dark-mode CSS removed.
  • Many conf/*.config.js and blog.config.js defaults flipped to a specific deployment's values (Cloud09 site, personal Twikoo server, large personal music playlist, removed CONTACT_EMAIL).
  • Repo plumbing: adds themes/endspace as a git submodule, duplicates two dependencies in package.json, copies yarn.lock and patches/ in Dockerfile.

Reviewed changes

Copilot reviewed 26 out of 28 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
package.json Bumps version, but introduces duplicate @tabler/icons-react and @supabase/supabase-js entries.
.gitmodules Adds themes/endspace as a submodule (conflicts with in-tree edits).
Dockerfile Copies yarn.lock and patches/ into deps stage.
blog.config.js Switches default theme to endspace and replaces generic defaults with personal site info.
conf/contact.config.js Removes CONTACT_EMAIL (used in ~20+ files) and hardcodes personal social links.
conf/comment.config.js Hardcodes a personal Twikoo server as the default.
conf/widget.config.js Inverts widget defaults; replaces example playlist with a ~250-track personal list; 名称: typo on one track.
conf/animation.config.js Tweaks default mouse follow/NEST effects.
conf/image.config.js Sets a default RANDOM_IMAGE_URL.
conf/post.config.js Disables share bar by default; bumps 404 wait to 9s.
conf/right-click-menu.js Disables several right-click menu defaults.
components/NotionPage.js Adds defensive null check in mapPageUrl.
pages/search/[keyword]/index.js Deletes allPages from props before returning.
public/svg/cloud.svg Adds a new SVG asset.
themes/endspace/* Major theme rewrite (config, style, layouts, menu, icons, search highlight); removes dark-mode CSS variants.
themes/hexo/config.js Disables several Hexo widget defaults.
themes/nav/components/LogoBar.js Guards siteInfo.icon before replaceAll.
Comments suppressed due to low confidence (1)

package.json:90

  • Duplicate dependency entries: @tabler/icons-react is now listed twice (lines 65 and 67), and @supabase/supabase-js is listed twice (lines 62 and 90). JSON does not allow duplicate keys—yarn/npm will warn and silently keep only one, but this indicates a botched merge conflict resolution. Please remove the duplicate entries so each package appears once.
    "translate:diagnose": "node scripts/translate/index.js --diagnose",
    "postinstall": "patch-package"
  },
  "dependencies": {
    "@clerk/localizations": "^3.17.1",
    "@clerk/nextjs": "^5.7.6",
    "@headlessui/react": "^1.7.19",
    "@next/bundle-analyzer": "^12.3.7",
    "@tabler/icons-react": "^3.36.1",
    "@supabase/supabase-js": "^2.57.4",
    "@tabler/icons-react": "^3.36.1",
    "@vercel/analytics": "^1.6.1",
    "@vercel/functions": "^3.4.3",
    "algoliasearch": "^4.25.2",
    "axios": "^1.16.1",
    "critters": "^0.0.23",
    "feed": "^4.2.2",
    "ioredis": "^5.6.1",
    "js-md5": "^0.8.3",
    "js-sha256": "^0.11.1",
    "memory-cache": "^0.2.0",
    "next": "^14.2.30",
    "notion-client": "7.10.0",
    "notion-utils": "7.10.0",
    "p-limit": "^7.3.0",
    "react": "^18.3.1",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread conf/widget.config.js
url: 'https://music.163.com/song/media/outer/url?id=731355.mp3',
cover:
'https://p1.music.126.net/kn6ugISTonvqJh3LHLaPtQ==/599233837187278.jpg'
名称 : 'Halo Universalization',
Comment thread conf/contact.config.js
Comment on lines 5 to +9
// 社交链接,不需要可留空白,例如 CONTACT_WEIBO:''
CONTACT_EMAIL:
(process.env.NEXT_PUBLIC_CONTACT_EMAIL &&
btoa(
unescape(encodeURIComponent(process.env.NEXT_PUBLIC_CONTACT_EMAIL))
)) ||
'', // 邮箱地址 例如mail@tangly1024.com
CONTACT_WEIBO: process.env.NEXT_PUBLIC_CONTACT_WEIBO || '', // 你的微博个人主页
CONTACT_TWITTER: process.env.NEXT_PUBLIC_CONTACT_TWITTER || '', // 你的twitter个人主页
CONTACT_GITHUB: process.env.NEXT_PUBLIC_CONTACT_GITHUB || '', // 你的github个人主页 例如 https://github.com/tangly1024
CONTACT_TELEGRAM: process.env.NEXT_PUBLIC_CONTACT_TELEGRAM || '', // 你的telegram 地址 例如 https://t.me/tangly_1024
CONTACT_WEIBO: process.env.NEXT_PUBLIC_CONTACT_WEIBO || 'https://weibo.com/cloud09', // 你的微博个人主页
CONTACT_TWITTER: process.env.NEXT_PUBLIC_CONTACT_TWITTER || 'https://x.com/Cloud09Official', // 你的twitter个人主页
CONTACT_GITHUB: process.env.NEXT_PUBLIC_CONTACT_GITHUB || 'https://github.com/cloud-oc', // 你的github个人主页 例如 https://github.com/tangly1024
CONTACT_TELEGRAM: process.env.NEXT_PUBLIC_CONTACT_TELEGRAM || 'https://t.me/cloud_oc', // 你的telegram 地址 例如 https://t.me/tangly_1024
Comment thread .gitmodules
Comment on lines +1 to +4
[submodule "themes/endspace"]
path = themes/endspace
url = https://github.com/cloud-oc/endspace.git
branch = theme No newline at end of file
Comment thread blog.config.js
Comment on lines +18 to +24
AUTHOR: process.env.NEXT_PUBLIC_AUTHOR || 'Cloud09', // 您的昵称 例如 tangly1024
BIO: process.env.NEXT_PUBLIC_BIO || '', // 作者简介
LINK: process.env.NEXT_PUBLIC_LINK || 'https://cloud09.space', // 网站地址
KEYWORDS: process.env.NEXT_PUBLIC_KEYWORD || 'Notion, 博客', // 网站关键词 英文逗号隔开
BLOG_FAVICON: process.env.NEXT_PUBLIC_FAVICON || '/favicon.ico', // blog favicon 配置, 默认使用 /public/favicon.ico,支持在线图片,如 https://img.imesong.com/favicon.png
BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '', // 备案号 闽ICP备XXXXXX
BEI_AN_LINK: process.env.NEXT_PUBLIC_BEI_AN_LINK || 'https://beian.miit.gov.cn/', // 备案查询链接,如果用了萌备等备案请在这里填写
BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '萌ICP备20250928号', // 备案号 闽ICP备XXXXXX
BEI_AN_LINK: process.env.NEXT_PUBLIC_BEI_AN_LINK || 'https://icp.gov.moe/?keyword=20250928', // 备案查询链接,如果用了萌备等备案请在这里填写
Comment thread conf/widget.config.js
Comment on lines +873 to 896
{
name: 'ETERNAL FLAME (VOID)',
artist: 'トゲナシトゲアリ',
url: 'http://music.163.com/song/media/outer/url?id=2621539076.mp3',
cover: 'https://p2.music.126.net/yPW_EmIsyR7iD6awPiiQUQ==/109951170148303857.jpg'
},
{
name: '闇に溶けてく',
artist: 'トゲナシトゲアリ',
url: 'http://music.163.com/song/media/outer/url?id=2621540490.mp3',
cover: 'https://p2.music.126.net/yPW_EmIsyR7iD6awPiiQUQ==/109951170148303857.jpg'
},
{
name: '蝶に結いた赤い糸',
artist: 'トゲナシトゲアリ',
url: 'http://music.163.com/song/media/outer/url?id=2621539078.mp3',
cover: 'https://p2.music.126.net/yPW_EmIsyR7iD6awPiiQUQ==/109951170148303857.jpg'
},
{
name: "You're Going to Love Tomorrow's Story",
artist: "Yokaze",
url: "https://cloud-oc.github.io/Audio-Bed/Music/You're Going to Love Tomorrow's Story.m4a",
cover: "https://github.com/cloud-oc/picx-images-hosting/raw/master/Blog/Unreal-Life-OST.26lxfpu9eq.png"
}
Comment thread conf/widget.config.js
Comment on lines +18 to +29
WIDGET_PET: process.env.NEXT_PUBLIC_WIDGET_PET || false, // 是否显示宠物挂件
WIDGET_PET_LINK:
process.env.NEXT_PUBLIC_WIDGET_PET_LINK ||
'https://cdn.jsdelivr.net/npm/live2d-widget-model-wanko@1.0.5/assets/wanko.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models
'https://raw.githubusercontent.com/imuncle/live2d/master/model/illyasviel/illyasviel.model.json', // 挂件模型地址 @see https://github.com/xiazeyu/live2d-widget-models
WIDGET_PET_SWITCH_THEME:
process.env.NEXT_PUBLIC_WIDGET_PET_SWITCH_THEME || true, // 点击宠物挂件切换博客主题
process.env.NEXT_PUBLIC_WIDGET_PET_SWITCH_THEME || false, // 点击宠物挂件切换博客主题

SPOILER_TEXT_TAG: process.env.NEXT_PUBLIC_SPOILER_TEXT_TAG || '', // Spoiler文本隐藏功能,如Notion中 [sp]希望被spoiler的文字[sp],填入[sp] 即可

// 音乐播放插件
MUSIC_PLAYER: process.env.NEXT_PUBLIC_MUSIC_PLAYER || false, // 是否使用音乐播放插件
MUSIC_PLAYER_VISIBLE: process.env.NEXT_PUBLIC_MUSIC_PLAYER_VISIBLE || true, // 是否在左下角显示播放和切换,如果使用播放器,打开自动播放再隐藏,就会以类似背景音乐的方式播放,无法取消和暂停
MUSIC_PLAYER: process.env.NEXT_PUBLIC_MUSIC_PLAYER || true, // 是否使用音乐播放插件
MUSIC_PLAYER_VISIBLE: process.env.NEXT_PUBLIC_MUSIC_PLAYER_VISIBLE || false, // 是否在左下角显示播放和切换,如果使用播放器,打开自动播放再隐藏,就会以类似背景音乐的方式播放,无法取消和暂停
Comment thread conf/comment.config.js

// twikoo
COMMENT_TWIKOO_ENV_ID: process.env.NEXT_PUBLIC_COMMENT_ENV_ID || '', // TWIKOO后端地址 腾讯云环境填envId;Vercel环境填域名,教程:https://tangly1024.com/article/notionnext-twikoo
COMMENT_TWIKOO_ENV_ID: process.env.NEXT_PUBLIC_COMMENT_ENV_ID || 'https://comment.cloud09.space', // TWIKOO后端地址 腾讯云环境填envId;Vercel环境填域名,教程:https://tangly1024.com/article/notionnext-twikoo
Comment thread themes/endspace/index.js
}
}
}, [router])
}, [keyword, posts])
Comment on lines +74 to +77
const menuItems = useMemo(
() => getEndspaceMenuItems(props),
[props.customMenu, props.customNav]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants