diff --git a/README.md b/README.md index ce45b2b6..e8931a2b 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,27 @@ **🕸  网址美观、搜索引擎优化** - 更多特性、欢迎移步[我的博客](https://tangly1024.com/article/notion-next)查看 +## 主题样式 +目前提供了4种主题 ,只需修改`/themes/index.js`文件即可实现切换。 +```javascript +// export * from './Empty' // 空模板 +// export * from './NEXT' +// export * from './Fukasawa' +// export * from './Hexo' +export * from './Medium' + +``` + + + +| 主题截图 | 预览地址 | +|--|--| +| | [notion-next.tangly1024.com](https://notion-next.tangly1024.com) | +| | [notion-medium.tangly1024.com](https://notion-medium.tangly1024.com/) | +| | [notion-hexo.tangly1024.com](http://notion-hexo.tangly1024.com/) | +| | [notion-fukasawa.tangly1024.com](https://notion-fukasawa.tangly1024.com/) | + + ## 更新日志 请移步 [更新文档](https://docs.tangly1024.com/zh/changelog)查看 @@ -66,13 +87,9 @@ ```bash yarn # 安装依赖 - yarn run dev # 本地开发 - yarn run build # 本地打包编译 - yarn run start # 本地启动NextJS服务 - ``` ## 引用技术 @@ -83,9 +100,6 @@ yarn run start # 本地启动NextJS服务 - **评论**: Gitalk, Cusdis, Utterances - **图标**:[fontawesome](https://fontawesome.com/v5.15/icons?d=gallery) -## 页面样式主题 -正在开发中..将支持配置文件切换主题 - ## License The MIT License. diff --git a/blog.config.js b/blog.config.js index a6f06c4f..6c22adf3 100644 --- a/blog.config.js +++ b/blog.config.js @@ -11,7 +11,7 @@ const BLOG = { LANG: 'zh-CN', // e.g 'zh-CN','en-US' see /lib/lang.js for more. SINCE: 2021, // e.g if leave this empty, current year will be used. - BEI_AN: '', // 备案号 闽ICP备XXXXXXX + BEI_AN: process.env.NEXT_PUBLIC_BEI_AN || '', // 备案号 闽ICP备XXXXXXX 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 diff --git a/components/Comment.js b/components/Comment.js index 9b47d752..772a3776 100644 --- a/components/Comment.js +++ b/components/Comment.js @@ -23,7 +23,7 @@ const Comment = ({ frontMatter }) => { const router = useRouter() const { locale } = useGlobal() return ( -
+
{BLOG.COMMENT_CUSDIS_APP_ID && (
{ + {JSON.parse(BLOG.ANALYTICS_BUSUANZI_ENABLE) && } {meta?.type === 'article' && ( <> { +const Tabs = ({ className, children }) => { if (!children) { return <> } @@ -18,7 +18,7 @@ const Tabs = ({ children }) => { }) if (count === 1) { - return
+ return
{children}
} @@ -29,7 +29,7 @@ const Tabs = ({ children }) => { setCurrentTab(i) } - return
+ return
    {children.map((item, index) => { return
  • { + scrollTrigger() window.addEventListener('scroll', scrollTrigger) return () => { window.removeEventListener('scroll', scrollTrigger) @@ -36,6 +37,7 @@ export default function HeaderArticle ({ post }) { return (