mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Merge branch 'main' into feat/theme-proxio
This commit is contained in:
139
README.md
139
README.md
@@ -2,7 +2,7 @@
|
||||
|
||||
访问帮助:[NotionNext帮助手册](https://docs.tangly1024.com/)
|
||||
|
||||
> 本项目教程为免费、公开资源,仅限个人学习使用。严禁任何个人或组织将本教程用于商业用途,包括但不限于直接售卖、间接收费、或其他变相盈利行为。转载、复制或介绍本教程内容时,须保留作者信息并明确注明来源。
|
||||
> 本项目教程为免费、公开资源,仅限个人学习使用,禁止利用本教程建立的博客发布非法内容、进行违法犯罪活动。严禁任何个人或组织将本教程用于商业用途,包括但不限于直接售卖、间接收费、或其他变相盈利行为。转载、复制或介绍本教程内容时,须保留作者信息并明确注明来源。
|
||||
> 本项目仅提供由作者团队授权的付费咨询服务,请注意辨别,谨防诈骗行为。任何未经授权的收费服务均可能存在法律风险。
|
||||
|
||||
Notion是一个能让效率暴涨的生产力引擎,可以帮你书写文档、管理笔记,搭建知识库,甚至可以为你规划项目、时间管理、组织团队、提高生产力、还有当前最强大的AI技术加持。
|
||||
@@ -52,142 +52,9 @@ Notion是一个能让效率暴涨的生产力引擎,可以帮你书写文档
|
||||
|
||||
## 贡献者
|
||||
|
||||
<table>
|
||||
<tr align="left">
|
||||
<td align="center">
|
||||
<a href="https://github.com/tangly1024" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/15920488" width="64px;"alt="tangly1024"/><br/><sub><b>tangly1024</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=tangly1024" title="Owner" >🎫 🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/uWayLu" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/21689326" width="64px;" alt="uWayLu"/><br/><sub><b>uWayLu</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=uWayLu" title="uWayLu" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/txs" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/554329" width="64px;" alt="txs"/><br/><sub><b>txs</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=txs" title="txs" >🔧 🐛</a>
|
||||
</td>
|
||||
感谢所有为 NotionNext 做出贡献的人!
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/yuzhanglong" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/56540811" width="64px;" alt="yuzhanglong"/><br/><sub><b>yuzhanglong</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=yuzhanglong" title="yuzhanglong" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Hscpro" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/13926044" width="64px;" alt="Hscpro"/><br/><sub><b>Hscpro</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Hscpro" title="Hscpro" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/JensonMiao" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/46488783" width="64px;" alt="JensonMiao"/><br/><sub><b>JensonMiao</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=JensonMiao" title="JensonMiao" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/haixin1225" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/28828438" width="64px;" alt="haixin1225"/><br/><sub><b>haixin1225</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=haixin1225" title="haixin1225" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/mouyase" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/7844572" width="64px;" alt="mouyase"/><br/><sub><b>mouyase</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=mouyase" title="mouyase" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/qfdk" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/2404478" width="64px;" alt="qfdk"/><br/><sub><b>qfdk</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=qfdk" title="qfdk" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/ifyz" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/118271360" width="64px;" alt="ifyz"/><br/><sub><b>ifyz</b></sub></a><br><a href="https://github.com/tangly1024/NotionNext/commits?author=ifyz" title="ifyz" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/liqun98" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/71168966" width="64px;" alt="Liqun Zhao"/><br/><sub><b>Liqun Zhao</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=liqun98" title="liqun98" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Ylarod" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/30978685" width="64px;" alt="Ylarod"/><br/><sub><b>Ylarod</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Ylarod" title="Ylarod" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/lifeafter619" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/65111206" width="64px;" alt="Etherrreal."/><br/><sub><b>Etherrreal.</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=lifeafter619" title="Etherrreal." >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/ykxkykx" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/17985993" width="64px;" alt="Joshua Astray"/><br/><sub><b>Joshua Astray</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=ykxkykx" title="ykxkykx" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Vixcity" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/57704177" width="64px;" alt="Vixcity"/><br/><sub><b>Vixcity</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Vixcity" title="Vixcity" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/ipatpat" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/39089551" width="64px;" alt="ipatpat"/><br/><sub><b>ipatpat</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=ipatpat" title="ipatpat" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/xloong" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/8479955" width="64px;" alt="xloong"/><br/><sub><b>xloong</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=xloong" title="xloong" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/expoli" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/31023767" width="64px;" alt="expoli"/><br/><sub><b>expoli</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=expoli" title="expoli" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/SuperHuangXu" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/14816052" width="64px;" alt="SuperHuangXu"/><br/><sub><b>bUBBLE</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=SuperHuangXu" title="SuperHuangXu" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Pylogmon" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/59004461" width="64px;" alt="Pylogmon"/><br/><sub><b>派了个萌 </b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Pylogmon" title="Pylogmon" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/SkysCrystal" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/49473463" width="64px;" alt="SkysCrystal"/><br/><sub><b>Simon Shi</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=SkysCrystal" title="SkysCrystal" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/siygle" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/173408" width="64px;" alt="S.Y. Lee"/><br/><sub><b>S.Y. Lee</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=siygle" title="siygle" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/fighting-bug" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/56441589" width="64px;" alt="fighting-buf"/><br/><sub><b>fighting-buf</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=fighting-bug" title="fighting-buf" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/cliouo" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/71540889" width="64px;" alt="cliouo"/><br/><sub><b>cliouo</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=cliouo" title="cliouo" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/sudeakq" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/102792219" width="64px;" alt="Sude Akgün"/><br/><sub><b>Sude Akgün</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=sudeakq" title="sudeakq" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/fgprodigal" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/769910" width="64px;" alt="Ray"/><br/><sub><b>Ray</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=fgprodigal" title="Ray" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/hongzzz" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/25585061" width="64px;" alt="Hongzzz"/><br/><sub><b>Hongzzz</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=hongzzz" title="hongzzz" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/RedhairHambagu" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/129669334" width="64px;" alt="RedhairHambagu"/><br/><sub><b>RedhairHambagu</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=RedhairHambagu" title="RedhairHambagu" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Allengl" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/58612763" width="64px;" alt="Allen"/><br/><sub><b>Allen</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Allengl" title="Allengl" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/zdf1230" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/5999425" width="64px;" alt="zdf1230"/><br/><sub><b>zdf</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=zdf1230" title="zdf1230" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/emengweb" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/31469739" width="64px;" alt="emengweb"/><br/><sub><b>emengweb</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=emengweb" title="emengweb" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/kitety" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/22906933" width="64px;" alt="kitety"/><br/><sub><b>kitety</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=kitety" title="kitety" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/jxpeng98" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/83734772" width="64px;" alt=" Jiaxin Peng"/><br/><sub><b> Jiaxin Peng</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=jxpeng98" title="jxpeng98" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
[](https://github.com/tangly1024/NotionNext/graphs/contributors)
|
||||
|
||||
## 引用技术
|
||||
|
||||
|
||||
118
README_EN.md
118
README_EN.md
@@ -53,123 +53,9 @@ Special thanks to Craig Hart for initiating the Nobelium project.
|
||||
|
||||
## Contributors
|
||||
|
||||
<table>
|
||||
<tr align="left">
|
||||
<td align="center">
|
||||
<a href="https://github.com/tangly1024" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/15920488" width="64px;"alt="tangly1024"/><br/><sub><b>tangly1024</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=tangly1024" title="Owner" >🎫 🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/uWayLu" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/21689326" width="64px;" alt="uWayLu"/><br/><sub><b>uWayLu</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=uWayLu" title="uWayLu" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/txs" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/554329" width="64px;" alt="txs"/><br/><sub><b>txs</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=txs" title="txs" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/yuzhanglong" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/56540811" width="64px;" alt="yuzhanglong"/><br/><sub><b>yuzhanglong</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=yuzhanglong" title="yuzhanglong" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Hscpro" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/13926044" width="64px;" alt="Hscpro"/><br/><sub><b>Hscpro</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Hscpro" title="Hscpro" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/JensonMiao" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/46488783" width="64px;" alt="JensonMiao"/><br/><sub><b>JensonMiao</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=JensonMiao" title="JensonMiao" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/haixin1225" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/28828438" width="64px;" alt="haixin1225"/><br/><sub><b>haixin1225</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=haixin1225" title="haixin1225" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/mouyase" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/7844572" width="64px;" alt="mouyase"/><br/><sub><b>mouyase</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=mouyase" title="mouyase" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/qfdk" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/2404478" width="64px;" alt="qfdk"/><br/><sub><b>qfdk</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=qfdk" title="qfdk" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/ifyz" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/118271360" width="64px;" alt="ifyz"/><br/><sub><b>ifyz</b></sub></a><br><a href="https://github.com/tangly1024/NotionNext/commits?author=ifyz" title="ifyz" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/liqun98" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/71168966" width="64px;" alt="Liqun Zhao"/><br/><sub><b>Liqun Zhao</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=liqun98" title="liqun98" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Ylarod" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/30978685" width="64px;" alt="Ylarod"/><br/><sub><b>Ylarod</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Ylarod" title="Ylarod" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/lifeafter619" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/65111206" width="64px;" alt="Etherrreal."/><br/><sub><b>Etherrreal.</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=lifeafter619" title="Etherrreal." >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/ykxkykx" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/17985993" width="64px;" alt="Joshua Astray"/><br/><sub><b>Joshua Astray</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=ykxkykx" title="ykxkykx" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Vixcity" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/57704177" width="64px;" alt="Vixcity"/><br/><sub><b>Vixcity</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Vixcity" title="Vixcity" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/ipatpat" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/39089551" width="64px;" alt="ipatpat"/><br/><sub><b>ipatpat</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=ipatpat" title="ipatpat" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/xloong" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/8479955" width="64px;" alt="xloong"/><br/><sub><b>xloong</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=xloong" title="xloong" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/expoli" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/31023767" width="64px;" alt="expoli"/><br/><sub><b>expoli</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=expoli" title="expoli" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/SuperHuangXu" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/14816052" width="64px;" alt="SuperHuangXu"/><br/><sub><b>bUBBLE</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=SuperHuangXu" title="SuperHuangXu" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/Pylogmon" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/59004461" width="64px;" alt="Pylogmon"/><br/><sub><b>派了个萌 </b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=Pylogmon" title="Pylogmon" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/SkysCrystal" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/49473463" width="64px;" alt="SkysCrystal"/><br/><sub><b>Simon Shi</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=SkysCrystal" title="SkysCrystal" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/siygle" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/173408" width="64px;" alt="S.Y. Lee"/><br/><sub><b>S.Y. Lee</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=siygle" title="siygle" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/fighting-bug" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/56441589" width="64px;" alt="fighting-buf"/><br/><sub><b>fighting-buf</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=fighting-bug" title="fighting-buf" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/cliouo" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/71540889" width="64px;" alt="cliouo"/><br/><sub><b>cliouo</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=cliouo" title="cliouo" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/sudeakq" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/102792219" width="64px;" alt="Sude Akgün"/><br/><sub><b>Sude Akgün</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=sudeakq" title="sudeakq" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/fgprodigal" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/769910" width="64px;" alt="Ray"/><br/><sub><b>Ray</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=fgprodigal" title="Ray" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/hongzzz" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/25585061" width="64px;" alt="Hongzzz"/><br/><sub><b>Hongzzz</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=hongzzz" title="hongzzz" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
<td align="center">
|
||||
<a href="https://github.com/RedhairHambagu" style="display:inline-block;width:80px"><img src="https://avatars.githubusercontent.com/u/129669334" width="64px;" alt="RedhairHambagu"/><br/><sub><b>RedhairHambagu</b></sub></a><br/><a href="https://github.com/tangly1024/NotionNext/commits?author=RedhairHambagu" title="RedhairHambagu" >🔧 🐛</a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
This project exists thanks to all the people who contribute.
|
||||
|
||||
[](https://github.com/tangly1024/NotionNext/graphs/contributors)
|
||||
|
||||
## Technologies Used
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ import { initGoogleAdsense } from './GoogleAdsense'
|
||||
import Head from 'next/head'
|
||||
import ExternalScript from './ExternalScript'
|
||||
import WebWhiz from './Webwhiz'
|
||||
import { useGlobal } from '@/lib/global'
|
||||
import IconFont from './IconFont'
|
||||
|
||||
|
||||
/**
|
||||
* 各种插件脚本
|
||||
@@ -19,6 +22,7 @@ import WebWhiz from './Webwhiz'
|
||||
const ExternalPlugin = props => {
|
||||
// 读取自Notion的配置
|
||||
const { NOTION_CONFIG } = props
|
||||
const {lang} = useGlobal()
|
||||
const DISABLE_PLUGIN = siteConfig('DISABLE_PLUGIN', null, NOTION_CONFIG)
|
||||
const THEME_SWITCH = siteConfig('THEME_SWITCH', null, NOTION_CONFIG)
|
||||
const DEBUG = siteConfig('DEBUG', null, NOTION_CONFIG)
|
||||
@@ -124,6 +128,8 @@ const ExternalPlugin = props => {
|
||||
NOTION_CONFIG
|
||||
)
|
||||
|
||||
const ENABLE_ICON_FONT = siteConfig('ENABLE_ICON_FONT', false)
|
||||
|
||||
// 自定义样式css和js引入
|
||||
if (isBrowser) {
|
||||
// 初始化AOS动画
|
||||
@@ -165,8 +171,8 @@ const ExternalPlugin = props => {
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
// 将notion-id格式的url转成自定义slug
|
||||
convertInnerUrl(props?.allNavPages)
|
||||
// 映射url
|
||||
convertInnerUrl({ allPages:props?.allNavPages, lang:lang })
|
||||
}, 500)
|
||||
}, [router])
|
||||
|
||||
@@ -184,6 +190,7 @@ const ExternalPlugin = props => {
|
||||
<>
|
||||
{/* 全局样式嵌入 */}
|
||||
<GlobalStyle />
|
||||
{ENABLE_ICON_FONT && <IconFont />}
|
||||
{MOUSE_FOLLOW && <MouseFollow />}
|
||||
{THEME_SWITCH && <ThemeSwitch />}
|
||||
{DEBUG && <DebugPanel />}
|
||||
|
||||
56
components/IconFont.js
Normal file
56
components/IconFont.js
Normal file
@@ -0,0 +1,56 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import { loadExternalResource } from '@/lib/utils'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
* iconfont
|
||||
*/
|
||||
export default function IconFont() {
|
||||
const router = useRouter()
|
||||
|
||||
useEffect(() => {
|
||||
loadExternalResource('/webfonts/iconfont.js')
|
||||
.then(u => {
|
||||
console.log('iconfont loaded');
|
||||
|
||||
// 查找所有 <i> 标签且 class 包含 'icon-'
|
||||
const iElements = document.querySelectorAll('i[class*="icon-"]');
|
||||
iElements.forEach(element => {
|
||||
const className = Array.from(element.classList).find(cls => cls.startsWith('icon-'));
|
||||
if (className) {
|
||||
// 创建新的 <svg> 元素
|
||||
const svgElement = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
svgElement.setAttribute('class', 'icon');
|
||||
svgElement.setAttribute('aria-hidden', 'true');
|
||||
|
||||
const useElement = document.createElementNS('http://www.w3.org/2000/svg', 'use');
|
||||
useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', `#${className}`);
|
||||
svgElement.appendChild(useElement);
|
||||
|
||||
// 替换原来的 <i> 元素
|
||||
element.replaceWith(svgElement);
|
||||
console.log(`Replaced <i> with class "${className}" to <svg>`);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(error => {
|
||||
console.warn('Failed to load iconfont.js:', error);
|
||||
});
|
||||
}, [router]);
|
||||
|
||||
return <style jsx global>
|
||||
{`
|
||||
.icon {
|
||||
width: 1.1em;
|
||||
height: 1.1em;
|
||||
vertical-align: -0.15em;
|
||||
fill: currentColor;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
svg.icon {
|
||||
display: inline;
|
||||
}
|
||||
`}</style>
|
||||
}
|
||||
@@ -37,6 +37,8 @@ import {
|
||||
TumblrShareButton,
|
||||
TwitterIcon,
|
||||
TwitterShareButton,
|
||||
ThreadsIcon,
|
||||
ThreadsShareButton,
|
||||
ViberIcon,
|
||||
ViberShareButton,
|
||||
VKIcon,
|
||||
@@ -312,6 +314,16 @@ const ShareButtons = ({ post }) => {
|
||||
<HatenaIcon size={32} round />
|
||||
</HatenaShareButton>
|
||||
)
|
||||
case 'threads':
|
||||
return (
|
||||
<ThreadsShareButton
|
||||
key={singleService}
|
||||
url={shareUrl}
|
||||
title={titleWithSiteInfo}
|
||||
className='mx-1'>
|
||||
<ThreadsIcon size={32} round />
|
||||
</ThreadsShareButton>
|
||||
)
|
||||
case 'qq':
|
||||
return (
|
||||
<button
|
||||
|
||||
2
lib/cache/cache_manager.js
vendored
2
lib/cache/cache_manager.js
vendored
@@ -40,7 +40,7 @@ export async function getOrSetDataWithCustomCache(
|
||||
) {
|
||||
const dataFromCache = await getDataFromCache(key)
|
||||
if (dataFromCache) {
|
||||
console.log('[缓存-->>API]:', key)
|
||||
// console.log('[缓存-->>API]:', key) // 避免过多的缓存日志输出
|
||||
return dataFromCache
|
||||
}
|
||||
const data = await getDataFunction(...getDataArgs)
|
||||
|
||||
@@ -245,7 +245,7 @@ async function convertNotionToSiteDate(pageId, from, pageRecordMap) {
|
||||
})
|
||||
|
||||
// Sort by date
|
||||
if (siteConfig('POSTS_SORT_BY', '', NOTION_CONFIG) === 'date') {
|
||||
if (siteConfig('POSTS_SORT_BY', null, NOTION_CONFIG) === 'date') {
|
||||
allPages.sort((a, b) => {
|
||||
return b?.publishDate - a?.publishDate
|
||||
})
|
||||
@@ -332,8 +332,6 @@ function handleDataBeforeReturn(db) {
|
||||
db.notice = cleanBlock(db?.notice)
|
||||
delete db.notice?.id
|
||||
}
|
||||
|
||||
db.tagOptions = cleanIds(db?.tagOptions)
|
||||
db.categoryOptions = cleanIds(db?.categoryOptions)
|
||||
db.customMenu = cleanIds(db?.customMenu)
|
||||
|
||||
@@ -344,6 +342,8 @@ function handleDataBeforeReturn(db) {
|
||||
db.allNavPages = cleanPages(db?.allNavPages, db.tagOptions)
|
||||
db.allPages = cleanPages(db.allPages, db.tagOptions)
|
||||
db.latestPosts = cleanPages(db.latestPosts, db.tagOptions)
|
||||
// 必须在使用完毕后才能进行清理
|
||||
db.tagOptions = cleanTagOptions(db?.tagOptions)
|
||||
|
||||
const POST_SCHEDULE_PUBLISH = siteConfig(
|
||||
'POST_SCHEDULE_PUBLISH',
|
||||
@@ -464,6 +464,22 @@ function cleanIds(items) {
|
||||
return items
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理和过滤tagOptions
|
||||
* @param {*} tagOptions
|
||||
* @returns
|
||||
*/
|
||||
function cleanTagOptions(tagOptions) {
|
||||
if (tagOptions && Array.isArray(tagOptions)) {
|
||||
return deepClone(
|
||||
tagOptions
|
||||
.filter(tagOption => tagOption.source === 'Published')
|
||||
.map(({ id, source, ...newTagOption }) => newTagOption)
|
||||
)
|
||||
}
|
||||
return tagOptions
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理block数据
|
||||
*/
|
||||
|
||||
@@ -8,12 +8,7 @@ import {
|
||||
import { useUser } from '@clerk/nextjs'
|
||||
import { useRouter } from 'next/router'
|
||||
import { createContext, useContext, useEffect, useState } from 'react'
|
||||
import {
|
||||
generateLocaleDict,
|
||||
initLocale,
|
||||
redirectUserLang,
|
||||
saveLangToLocalStorage
|
||||
} from './lang'
|
||||
import { generateLocaleDict, initLocale, redirectUserLang } from './lang'
|
||||
|
||||
/**
|
||||
* 全局上下文
|
||||
@@ -81,7 +76,6 @@ export function GlobalContextProvider(props) {
|
||||
|
||||
function changeLang(lang) {
|
||||
if (lang) {
|
||||
saveLangToLocalStorage(lang)
|
||||
updateLang(lang)
|
||||
updateLocale(generateLocaleDict(lang))
|
||||
}
|
||||
|
||||
27
lib/lang.js
27
lib/lang.js
@@ -8,6 +8,7 @@ import zhCN from './lang/zh-CN'
|
||||
import zhHK from './lang/zh-HK'
|
||||
import zhTW from './lang/zh-TW'
|
||||
import { extractLangPrefix } from './utils/pageId'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
/**
|
||||
* 在这里配置所有支持的语言
|
||||
@@ -70,15 +71,9 @@ export function generateLocaleDict(langString) {
|
||||
*/
|
||||
export function initLocale(locale, changeLang, updateLocale) {
|
||||
if (isBrowser) {
|
||||
// 根据router中的locale对象判断当前语言:表现为前缀中包含 zh、en 等。
|
||||
let pathLocaleLang = null
|
||||
if (locale === 'en' || locale === 'zh') {
|
||||
pathLocaleLang = locale === 'en' ? 'en-US' : 'zh-CN'
|
||||
}
|
||||
// 如果有query参数切换语言则优先
|
||||
const queryLang =
|
||||
getQueryVariable('locale') || getQueryVariable('lang') || pathLocaleLang
|
||||
|
||||
getQueryVariable('locale') || getQueryVariable('lang') || locale
|
||||
if (queryLang) {
|
||||
const match = queryLang.match(/[a-zA-Z]{2}(?:-[a-zA-Z]{2})?/)
|
||||
if (match) {
|
||||
@@ -91,22 +86,6 @@ export function initLocale(locale, changeLang, updateLocale) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取语言
|
||||
* @returns {*}
|
||||
*/
|
||||
export const loadLangFromLocalStorage = () => {
|
||||
return localStorage.getItem('lang')
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存语言
|
||||
* @param newTheme
|
||||
*/
|
||||
export const saveLangToLocalStorage = lang => {
|
||||
localStorage.setItem('lang', lang)
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测用户的预研偏好,跳转至对应的多语言网站
|
||||
* @param {*} lang
|
||||
@@ -142,4 +121,4 @@ export const redirectUserLang = (lang, pageId) => {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,7 +71,8 @@ export default {
|
||||
WORD_COUNT: 'Words',
|
||||
READ_TIME: 'Read Time',
|
||||
NEXT_POST: 'Next',
|
||||
PREV_POST: 'Prev'
|
||||
PREV_POST: 'Prev',
|
||||
NOT_FOUND: 'Page not found.'
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: 'Prev',
|
||||
@@ -91,6 +92,6 @@ export default {
|
||||
EMAIL: 'Email'
|
||||
},
|
||||
AI_SUMMARY: {
|
||||
NAME: 'AI intelligent summary',
|
||||
NAME: 'AI intelligent summary'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ export default {
|
||||
SUBMIT: 'Valider',
|
||||
POST_TIME: 'Date de publication',
|
||||
LAST_EDITED_TIME: 'Date de modification',
|
||||
RECENT_COMMENTS: 'Nouveau commentaire'
|
||||
RECENT_COMMENTS: 'Nouveau commentaire',
|
||||
NOT_FOUND: ''
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: 'PREV',
|
||||
@@ -53,6 +54,6 @@ export default {
|
||||
TOP: 'Haut'
|
||||
},
|
||||
AI_SUMMARY: {
|
||||
NAME: "Résumé intelligent par l'IA",
|
||||
NAME: "Résumé intelligent par l'IA"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,8 @@ export default {
|
||||
DEBUG_CLOSE: 'デバッグをオフにする',
|
||||
THEME_SWITCH: 'テーマの切り替え',
|
||||
ANNOUNCEMENT: 'お知らせ',
|
||||
START_READING: '読み始める'
|
||||
START_READING: '読み始める',
|
||||
NOT_FOUND: ''
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: '前のページ',
|
||||
@@ -60,6 +61,6 @@ export default {
|
||||
TOP: '上に戻る'
|
||||
},
|
||||
AI_SUMMARY: {
|
||||
NAME: 'AIインテリジェントサマリー',
|
||||
NAME: 'AIインテリジェントサマリー'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,8 @@ export default {
|
||||
DEBUG_OPEN: 'Hata Ayıklama',
|
||||
DEBUG_CLOSE: 'Kapat',
|
||||
THEME_SWITCH: 'Temayı Değiştir',
|
||||
ANNOUNCEMENT: 'Duyuru'
|
||||
ANNOUNCEMENT: 'Duyuru',
|
||||
NOT_FOUND: ''
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: 'Önceki',
|
||||
@@ -55,6 +56,6 @@ export default {
|
||||
TOP: 'Yukarı'
|
||||
},
|
||||
AI_SUMMARY: {
|
||||
NAME: 'Yapay Zeka Akıllı Özet',
|
||||
NAME: 'Yapay Zeka Akıllı Özet'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,8 @@ export default {
|
||||
WORD_COUNT: '字数',
|
||||
READ_TIME: '阅读时长',
|
||||
NEXT_POST: '下一篇',
|
||||
PREV_POST: '上一篇'
|
||||
PREV_POST: '上一篇',
|
||||
NOT_FOUND: '页面未找到'
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: '上页',
|
||||
@@ -91,6 +92,6 @@ export default {
|
||||
EMAIL: '邮箱'
|
||||
},
|
||||
AI_SUMMARY: {
|
||||
NAME: 'AI智能摘要',
|
||||
NAME: 'AI智能摘要'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +39,8 @@ export default {
|
||||
POST_TIME: '發表於',
|
||||
LAST_EDITED_TIME: '最後更新',
|
||||
NEXT_POST: '下一篇',
|
||||
PREV_POST: '上一篇'
|
||||
PREV_POST: '上一篇',
|
||||
NOT_FOUND: ''
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: '上一頁',
|
||||
@@ -54,6 +55,6 @@ export default {
|
||||
TOP: '回到頁頂'
|
||||
},
|
||||
AI_SUMMARY: {
|
||||
NAME: 'AI 智能摘要',
|
||||
NAME: 'AI 智能摘要'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,8 @@ export default {
|
||||
WORD_COUNT: '字數',
|
||||
READ_TIME: '閱讀時間',
|
||||
NEXT_POST: '下一篇',
|
||||
PREV_POST: '上一篇'
|
||||
PREV_POST: '上一篇',
|
||||
NOT_FOUND: '未找到該頁面'
|
||||
},
|
||||
PAGINATION: {
|
||||
PREV: '上一頁',
|
||||
@@ -89,6 +90,6 @@ export default {
|
||||
EMAIL: '電子信箱'
|
||||
},
|
||||
AI_SUMMARY: {
|
||||
NAME: 'AI 智慧摘要',
|
||||
NAME: 'AI 智慧摘要'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { loadLangFromLocalStorage } from '@/lib/lang'
|
||||
import { idToUuid } from 'notion-utils'
|
||||
import { checkStrIsNotionId, getLastPartOfUrl, isBrowser } from '../utils'
|
||||
|
||||
@@ -7,7 +6,7 @@ import { checkStrIsNotionId, getLastPartOfUrl, isBrowser } from '../utils'
|
||||
* 1.若是本站域名,则在当前窗口打开、不开新窗口
|
||||
* 2.url是notion-id,转成站内文章链接
|
||||
*/
|
||||
export const convertInnerUrl = allPages => {
|
||||
export const convertInnerUrl = ({ allPages, lang }) => {
|
||||
if (!isBrowser) {
|
||||
return
|
||||
}
|
||||
@@ -18,11 +17,9 @@ export const convertInnerUrl = allPages => {
|
||||
if (!allAnchorTags) {
|
||||
return
|
||||
}
|
||||
|
||||
const { origin, pathname } = window.location
|
||||
const currentURL = origin + pathname
|
||||
const currentPathLang = pathname.split('/').filter(Boolean)[0]
|
||||
const lang = loadLangFromLocalStorage().split(/[-_]/)[0]
|
||||
const langPrefix = lang === currentPathLang ? '/' + lang : ''
|
||||
for (const anchorTag of allAnchorTags) {
|
||||
// url替换成slug
|
||||
@@ -56,6 +53,7 @@ export const convertInnerUrl = allPages => {
|
||||
anchorTag.target = '_blank'
|
||||
}
|
||||
}
|
||||
|
||||
for (const anchorTag of allAnchorTags) {
|
||||
const slug = getLastPartOfUrl(anchorTag.href)
|
||||
const slugPage = allPages?.find(page => {
|
||||
|
||||
@@ -14,23 +14,38 @@ export function getAllTags({
|
||||
tagOptions,
|
||||
NOTION_CONFIG
|
||||
}) {
|
||||
// 保留Invisible的Page中的Tags,最后再过滤掉
|
||||
const allPosts = allPages?.filter(
|
||||
page => page.type === 'Post' && page.status === 'Published'
|
||||
page =>
|
||||
page.type === 'Post' &&
|
||||
(page.status === 'Published' || page.status === 'Invisible')
|
||||
)
|
||||
|
||||
if (!allPosts || !tagOptions) {
|
||||
return []
|
||||
}
|
||||
// 计数
|
||||
let tags = allPosts?.map(p => p.tags)
|
||||
tags = [...tags.flat()]
|
||||
const tagObj = {}
|
||||
tags.forEach(tag => {
|
||||
if (tag in tagObj) {
|
||||
tagObj[tag]++
|
||||
} else {
|
||||
tagObj[tag] = 1
|
||||
}
|
||||
// Tag数据统计
|
||||
const AllTagInfos = {}
|
||||
// 遍历所有文章
|
||||
allPosts.forEach(post => {
|
||||
post?.tags?.forEach(tag => {
|
||||
// 如果标签已经存在
|
||||
if (AllTagInfos[tag]) {
|
||||
if (
|
||||
AllTagInfos[tag].source === 'Invisible' &&
|
||||
post.status === 'Published'
|
||||
) {
|
||||
AllTagInfos[tag].source = post.status
|
||||
}
|
||||
AllTagInfos[tag].count++
|
||||
} else {
|
||||
// 如果标签不存在,创建一个新的标签对象
|
||||
AllTagInfos[tag] = {
|
||||
count: 1,
|
||||
source: post.status
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const list = []
|
||||
@@ -46,18 +61,18 @@ export function getAllTags({
|
||||
const savedTagNames = new Set()
|
||||
tagOptions.forEach(c => {
|
||||
if (!savedTagNames.has(c.value)) {
|
||||
const count = tagObj[c.value]
|
||||
if (count) {
|
||||
list.push({ id: c.id, name: c.value, color: c.color, count })
|
||||
const tagInfo = AllTagInfos[c.value]
|
||||
if (tagInfo) {
|
||||
list.push({ id: c.id, name: c.value, color: c.color, ...tagInfo })
|
||||
}
|
||||
savedTagNames.add(c.value)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
tagOptions.forEach(c => {
|
||||
const count = tagObj[c.value]
|
||||
if (count) {
|
||||
list.push({ id: c.id, name: c.value, color: c.color, count })
|
||||
const tagInfo = AllTagInfos[c.value]
|
||||
if (tagInfo) {
|
||||
list.push({ id: c.id, name: c.value, color: c.color, ...tagInfo })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
import BLOG from '@/blog.config'
|
||||
import { getDataFromCache, getOrSetDataWithCache, setDataToCache } from '@/lib/cache/cache_manager'
|
||||
import {
|
||||
getDataFromCache,
|
||||
getOrSetDataWithCache,
|
||||
setDataToCache
|
||||
} from '@/lib/cache/cache_manager'
|
||||
import { deepClone, delay } from '../utils'
|
||||
import notionAPI from '@/lib/notion/getNotionAPI'
|
||||
|
||||
/**
|
||||
* 获取文章内容
|
||||
* 获取文章内容块
|
||||
* @param {*} id
|
||||
* @param {*} from
|
||||
* @param {*} slice
|
||||
* @returns
|
||||
*/
|
||||
export async function getPage(id, from = null, slice) {
|
||||
const cacheKey = `page_content_${id}`
|
||||
return await getOrSetDataWithCache(
|
||||
`page_content_${id}_${slice}`,
|
||||
cacheKey,
|
||||
async (id, slice) => {
|
||||
const cacheKey = `page_block_${id}`
|
||||
let pageBlock = await getDataFromCache(cacheKey)
|
||||
if (pageBlock) {
|
||||
// console.debug('[API<<--缓存]', `from:${from}`, cacheKey)
|
||||
@@ -139,8 +143,7 @@ function convertNotionBlocksToPost(id, blockMap, slice) {
|
||||
b?.value?.type === 'pdf' ||
|
||||
b?.value?.type === 'video' ||
|
||||
b?.value?.type === 'audio') &&
|
||||
b?.value?.properties?.source?.[0][0] &&
|
||||
b?.value?.properties?.source?.[0][0].indexOf('amazonaws.com') > 0
|
||||
b?.value?.properties?.source?.[0][0]
|
||||
) {
|
||||
const oldUrl = b?.value?.properties?.source?.[0][0]
|
||||
const newUrl = `https://notion.so/signed/${encodeURIComponent(oldUrl)}?table=block&id=${b?.value?.id}`
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// https://developers.google.com/analytics/devguides/collection/gtagjs/pages
|
||||
export const pageview = (url, ANALYTICS_GOOGLE_ID) => {
|
||||
if (window.gtag === undefined) { return }
|
||||
window.gtag('config', ANALYTICS_GOOGLE_ID, {
|
||||
page_path: url
|
||||
})
|
||||
@@ -7,6 +8,7 @@ export const pageview = (url, ANALYTICS_GOOGLE_ID) => {
|
||||
|
||||
// https://developers.google.com/analytics/devguides/collection/gtagjs/events
|
||||
export const event = ({ action, category, label, value }) => {
|
||||
if (window.gtag === undefined) { return }
|
||||
window.gtag('event', action, {
|
||||
event_category: category,
|
||||
event_label: label,
|
||||
|
||||
@@ -6,7 +6,11 @@ import { siteConfig } from './config'
|
||||
* @param {*} param0
|
||||
*/
|
||||
export async function generateSitemapXml({ allPages, NOTION_CONFIG }) {
|
||||
const link = siteConfig('LINK', BLOG.LINK, NOTION_CONFIG)
|
||||
let link = siteConfig('LINK', BLOG.LINK, NOTION_CONFIG)
|
||||
// 确保链接不以斜杠结尾
|
||||
if (link && link.endsWith('/')) {
|
||||
link = link.slice(0, -1)
|
||||
}
|
||||
const urls = [
|
||||
{
|
||||
loc: `${link}`,
|
||||
|
||||
@@ -15,7 +15,7 @@ const themes = scanSubdirectories(path.resolve(__dirname, 'themes'))
|
||||
const locales = (function () {
|
||||
// 根据BLOG_NOTION_PAGE_ID 检查支持多少种语言数据.
|
||||
// 支持如下格式配置多个语言的页面id xxx,zh:xxx,en:xxx
|
||||
const langs = [BLOG.LANG.slice(0, 2)]
|
||||
const langs = [BLOG.LANG]
|
||||
if (BLOG.NOTION_PAGE_ID.indexOf(',') > 0) {
|
||||
const siteIds = BLOG.NOTION_PAGE_ID.split(',')
|
||||
for (let index = 0; index < siteIds.length; index++) {
|
||||
@@ -84,15 +84,19 @@ const nextConfig = {
|
||||
eslint: {
|
||||
ignoreDuringBuilds: true
|
||||
},
|
||||
output: process.env.EXPORT ? 'export' : process.env.NEXT_BUILD_STANDALONE === 'true' ? 'standalone' : undefined,
|
||||
output: process.env.EXPORT
|
||||
? 'export'
|
||||
: process.env.NEXT_BUILD_STANDALONE === 'true'
|
||||
? 'standalone'
|
||||
: undefined,
|
||||
staticPageGenerationTimeout: 120,
|
||||
// 多语言, 在export时禁用
|
||||
i18n: process.env.EXPORT
|
||||
? undefined
|
||||
: {
|
||||
defaultLocale: BLOG.LANG.slice(0, 2),
|
||||
defaultLocale: BLOG.LANG,
|
||||
// 支持的所有多语言,按需填写即可
|
||||
locales
|
||||
locales: locales
|
||||
},
|
||||
images: {
|
||||
// 图片压缩
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "notion-next",
|
||||
"version": "4.8.3",
|
||||
"version": "4.8.4",
|
||||
"homepage": "https://github.com/tangly1024/NotionNext.git",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -43,7 +43,7 @@
|
||||
"react-facebook": "^8.1.4",
|
||||
"react-hotkeys-hook": "^4.5.0",
|
||||
"react-notion-x": "6.16.0",
|
||||
"react-share": "^4.4.1",
|
||||
"react-share": "^5.2.2",
|
||||
"react-tweet-embed": "~2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -38,6 +38,11 @@ export const getServerSideProps = async ctx => {
|
||||
}
|
||||
|
||||
function generateLocalesSitemap(link, allPages, locale) {
|
||||
// 确保链接不以斜杠结尾
|
||||
if (link && link.endsWith('/')) {
|
||||
link = link.slice(0, -1)
|
||||
}
|
||||
|
||||
if (locale && locale.length > 0 && locale.indexOf('/') !== 0) {
|
||||
locale = '/' + locale
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ function createRibbon() {
|
||||
a = window.innerWidth,
|
||||
l = window.innerHeight,
|
||||
d = e.s
|
||||
i.id = id
|
||||
i.id = '__next'
|
||||
let r, s
|
||||
const u = Math
|
||||
let h = 0
|
||||
|
||||
@@ -22,7 +22,7 @@ function SiteInfo({ title }) {
|
||||
{siteConfig('BEI_AN') && (
|
||||
<>
|
||||
<i className='fas fa-shield-alt' />
|
||||
<a href='https://beian.miit.gov.cn/' className='mr-2'>
|
||||
<a href={siteConfig('BEI_AN_LINK')} className='mr-2'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
<br />
|
||||
|
||||
@@ -33,7 +33,7 @@ const Footer = ({ siteInfo }) => {
|
||||
{siteConfig('BEI_AN') && (
|
||||
<>
|
||||
<i className='fas fa-shield-alt' />{' '}
|
||||
<a href='https://beian.miit.gov.cn/' className='mr-2'>
|
||||
<a href={siteConfig('BEI_AN_LINK')} className='mr-2'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
<BeiAnGongAn />
|
||||
|
||||
@@ -9,6 +9,7 @@ import SocialButton from './SocialButton'
|
||||
*/
|
||||
const Footer = () => {
|
||||
const BEI_AN = siteConfig('BEI_AN')
|
||||
const BEI_AN_LINK = siteConfig('BEI_AN_LINK')
|
||||
const BIO = siteConfig('BIO')
|
||||
return (
|
||||
<footer className='relative flex-shrink-0 bg-white dark:bg-[#1a191d] justify-center text-center m-auto w-full leading-6 text-gray-600 dark:text-gray-100 text-sm'>
|
||||
@@ -46,7 +47,7 @@ const Footer = () => {
|
||||
{BEI_AN && (
|
||||
<>
|
||||
<i className='fas fa-shield-alt' />{' '}
|
||||
<a href='https://beian.miit.gov.cn/' className='mr-2'>
|
||||
<a href={BEI_AN_LINK} className='mr-2'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
</>
|
||||
|
||||
@@ -25,8 +25,12 @@ export const MenuItemDrop = ({ link }) => {
|
||||
{/* 含子菜单的按钮 */}
|
||||
{hasSubMenu && (
|
||||
<>
|
||||
<div className='cursor-pointer hover:bg-black hover:bg-opacity-10 rounded-2xl flex justify-center items-center px-3 py-1 no-underline tracking-widest'>
|
||||
<div className='cursor-pointer hover:bg-black hover:bg-opacity-10 rounded-2xl flex justify-center items-center px-3 py-1 no-underline tracking-widest relative'>
|
||||
{link?.icon && <i className={link?.icon} />} {link?.name}
|
||||
{/* 主菜单下方的安全区域 */}
|
||||
{show && (
|
||||
<div className='absolute w-full h-4 -bottom-4 left-0 bg-transparent z-30'></div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
@@ -34,7 +38,7 @@ export const MenuItemDrop = ({ link }) => {
|
||||
{hasSubMenu && (
|
||||
<ul
|
||||
style={{ backdropFilter: 'blur(3px)' }}
|
||||
className={`${show ? 'visible opacity-100 top-14' : 'invisible opacity-0 top-20'} drop-shadow-md overflow-hidden rounded-xl bg-white dark:bg-[#1e1e1e] transition-all duration-300 z-20 absolute`}>
|
||||
className={`${show ? 'visible opacity-100 top-14 pointer-events-auto' : 'invisible opacity-0 top-20 pointer-events-none'} drop-shadow-md overflow-hidden rounded-xl bg-white dark:bg-[#1e1e1e] transition-all duration-300 z-20 absolute`}>
|
||||
{link.subMenus.map((sLink, index) => {
|
||||
return (
|
||||
<li
|
||||
|
||||
@@ -29,10 +29,14 @@ export const MenuItemDrop = ({ link }) => {
|
||||
|
||||
{hasSubMenu && (
|
||||
<>
|
||||
<div className='cursor-pointer menu-link pl-2 pr-4 no-underline tracking-widest pb-1'>
|
||||
<div className='cursor-pointer menu-link pl-2 pr-4 no-underline tracking-widest pb-1 relative'>
|
||||
{link?.icon && <i className={link?.icon} />} {link?.name}
|
||||
<i
|
||||
className={`px-2 fa fa-angle-down duration-300 ${show ? 'rotate-180' : 'rotate-0'}`}></i>
|
||||
{/* 主菜单下方的安全区域 */}
|
||||
{show && (
|
||||
<div className='absolute w-full h-3 -bottom-1 left-0 bg-transparent z-30'></div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
@@ -41,7 +45,7 @@ export const MenuItemDrop = ({ link }) => {
|
||||
{hasSubMenu && (
|
||||
<ul
|
||||
style={{ backdropFilter: 'blur(3px)' }}
|
||||
className={`${show ? 'visible opacity-100 top-12' : 'invisible opacity-0 top-20'} drop-shadow-md overflow-hidden rounded-md text-black dark:text-white bg-white dark:bg-black transition-all duration-300 z-20 absolute block `}>
|
||||
className={`${show ? 'visible opacity-100 top-12 pointer-events-auto' : 'invisible opacity-0 top-20 pointer-events-none'} drop-shadow-md overflow-hidden rounded-md text-black dark:text-white bg-white dark:bg-black transition-all duration-300 z-20 absolute block `}>
|
||||
{link.subMenus.map((sLink, index) => {
|
||||
return (
|
||||
<li
|
||||
|
||||
@@ -330,6 +330,7 @@ const LayoutSlug = props => {
|
||||
*/
|
||||
const Layout404 = props => {
|
||||
const router = useRouter()
|
||||
const { locale } = useGlobal()
|
||||
useEffect(() => {
|
||||
// 延时3秒如果加载失败就返回首页
|
||||
setTimeout(() => {
|
||||
@@ -351,7 +352,7 @@ const Layout404 = props => {
|
||||
404
|
||||
</h2>
|
||||
<div className='inline-block text-left h-32 leading-10 items-center'>
|
||||
<h2 className='m-0 p-0'>页面未找到</h2>
|
||||
<h2 className='m-0 p-0'>{locale.COMMON.NOT_FOUND}</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@ export const MenuItemDrop = ({ link }) => {
|
||||
{/* 子菜单 */}
|
||||
{hasSubMenu && (
|
||||
<ul
|
||||
className={`${show ? 'visible opacity-100 top-14' : 'invisible opacity-0 top-20'} p-1 absolute border bg-white dark:bg-black dark:border-gray-800 transition-all duration-150 z-20 block rounded-lg drop-shadow-lg`}>
|
||||
className={`${show ? 'visible opacity-100 top-14 pointer-events-auto' : 'invisible opacity-0 top-20 pointer-events-none'} p-1 absolute border bg-white dark:bg-black dark:border-gray-800 transition-all duration-150 z-20 block rounded-lg drop-shadow-lg`}>
|
||||
{link?.subMenus?.map(sLink => {
|
||||
return (
|
||||
<li
|
||||
|
||||
@@ -31,7 +31,7 @@ const Footer = ({ title }) => {
|
||||
{siteConfig('BEI_AN') && (
|
||||
<>
|
||||
<i className='fas fa-shield-alt' />{' '}
|
||||
<a href='https://beian.miit.gov.cn/' className='mr-2'>
|
||||
<a href={siteConfig('BEI_AN_LINK')} className='mr-2'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
<br />
|
||||
|
||||
@@ -28,10 +28,14 @@ export const MenuItemDrop = ({ link }) => {
|
||||
|
||||
{hasSubMenu && (
|
||||
<>
|
||||
<div className='cursor-pointer menu-link pl-2 pr-4 no-underline tracking-widest pb-1'>
|
||||
<div className='cursor-pointer menu-link pl-2 pr-4 no-underline tracking-widest pb-1 relative'>
|
||||
{link?.icon && <i className={link?.icon} />} {link?.name}
|
||||
<i
|
||||
className={`px-2 fa fa-angle-down duration-300 ${show ? 'rotate-180' : 'rotate-0'}`}></i>
|
||||
{/* 主菜单下方的安全区域 */}
|
||||
{show && (
|
||||
<div className='absolute w-full h-3 -bottom-1 left-0 bg-transparent z-30'></div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
@@ -40,7 +44,7 @@ export const MenuItemDrop = ({ link }) => {
|
||||
{hasSubMenu && (
|
||||
<ul
|
||||
style={{ backdropFilter: 'blur(3px)' }}
|
||||
className={`${show ? 'visible opacity-100 top-12' : 'invisible opacity-0 top-20'} drop-shadow-md overflow-hidden rounded-md bg-white transition-all duration-300 z-20 absolute block `}>
|
||||
className={`${show ? 'visible opacity-100 top-12 pointer-events-auto' : 'invisible opacity-0 top-20 pointer-events-none'} drop-shadow-md overflow-hidden rounded-md bg-white transition-all duration-300 z-20 absolute block `}>
|
||||
{link.subMenus.map((sLink, index) => {
|
||||
return (
|
||||
<li
|
||||
|
||||
@@ -24,7 +24,7 @@ const Footer = ({ title }) => {
|
||||
{siteConfig('BEI_AN') && (
|
||||
<>
|
||||
<i className='fas fa-shield-alt' />
|
||||
<a href='https://beian.miit.gov.cn/' className='mr-2'>
|
||||
<a href={siteConfig('BEI_AN_LINK')} className='mr-2'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
<br />
|
||||
|
||||
@@ -27,7 +27,7 @@ export const Footer = props => {
|
||||
{/* <a href="#" className="text-black no-underline hover:underline">Privacy Policy</a> */}
|
||||
{siteConfig('BEI_AN') && (
|
||||
<a
|
||||
href='https://beian.miit.gov.cn/'
|
||||
href={siteConfig('BEI_AN_LINK')}
|
||||
className='text-black dark:text-gray-200 no-underline hover:underline ml-4'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
|
||||
@@ -37,7 +37,7 @@ export const MenuItemDrop = ({ link }) => {
|
||||
{hasSubMenu && (
|
||||
<ul
|
||||
style={{ backdropFilter: 'blur(3px)' }}
|
||||
className={`${show ? 'visible opacity-100 top-14' : 'invisible opacity-0 top-20'} drop-shadow-md overflow-hidden rounded-md text-black dark:text-white bg-white dark:bg-black transition-all duration-300 z-30 absolute block `}>
|
||||
className={`${show ? 'visible opacity-100 top-14 pointer-events-auto' : 'invisible opacity-0 top-20 pointer-events-none'} drop-shadow-md overflow-hidden rounded-md text-black dark:text-white bg-white dark:bg-black transition-all duration-300 z-30 absolute block `}>
|
||||
{link.subMenus.map((sLink, index) => {
|
||||
return (
|
||||
<li
|
||||
|
||||
@@ -37,7 +37,7 @@ const Footer = ({ siteInfo }) => {
|
||||
{siteConfig('BEI_AN') && (
|
||||
<>
|
||||
<i className='fas fa-shield-alt' />{' '}
|
||||
<a href='https://beian.miit.gov.cn/' className='mr-2'>
|
||||
<a href={siteConfig('BEI_AN_LINK')} className='mr-2'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
<br />
|
||||
|
||||
@@ -24,7 +24,7 @@ const Footer = ({ title }) => {
|
||||
{siteConfig('BEI_AN') && (
|
||||
<>
|
||||
<i className='fas fa-shield-alt' />{' '}
|
||||
<a href='https://beian.miit.gov.cn/' className='mr-2'>
|
||||
<a href={siteConfig('BEI_AN_LINK')} className='mr-2'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
<br />
|
||||
|
||||
@@ -27,7 +27,7 @@ export const Footer = props => {
|
||||
{/* <a href="#" className="text-black no-underline hover:underline">Privacy Policy</a> */}
|
||||
{siteConfig('BEI_AN') && (
|
||||
<a
|
||||
href='https://beian.miit.gov.cn/'
|
||||
href={siteConfig('BEI_AN_LINK')}
|
||||
className='text-black dark:text-gray-200 no-underline hover:underline ml-4'>
|
||||
{siteConfig('BEI_AN')}
|
||||
</a>
|
||||
|
||||
@@ -25,7 +25,7 @@ export default function NavBar(props) {
|
||||
|
||||
const onKeyUp = e => {
|
||||
if (e.keyCode === 13) {
|
||||
const search = document.getElementById('simple-search').innerText
|
||||
const search = document.getElementById('simple-search').value
|
||||
if (search) {
|
||||
router.push({ pathname: '/search/' + search })
|
||||
}
|
||||
|
||||
@@ -99,6 +99,15 @@ const SocialButton = () => {
|
||||
<i className='fab fa-youtube transform hover:scale-125 duration-150' />
|
||||
</a>
|
||||
)}
|
||||
{siteConfig('CONTACT_THREADS') && (
|
||||
<a
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
title={'threads'}
|
||||
href={siteConfig('CONTACT_THREADS')}>
|
||||
<i className='fab fa-threads transform hover:scale-125 duration-150' />
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
@@ -32,5 +32,8 @@
|
||||
"**/*.jsx",
|
||||
".eslintrc.js"
|
||||
],
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"public"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user