Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 62546f4
Merge: 8dabd69 cd4661a
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Aug 23 22:29:54 2023 +0800

    Merge pull request tangly1024#1461 from Ghlerrix/pushUrl

    优化百度推送和新增必应推送

commit 8dabd69
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 18 17:47:24 2023 +0800

    log rm

commit f7fee07
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 18 17:45:17 2023 +0800

    gitbook/heo 广告位

commit 26373f1
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 18 17:15:26 2023 +0800

    gitbook广告微调

commit f1fa380
Merge: 92081c6 b4e40d8
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Aug 18 16:03:41 2023 +0800

    Merge pull request tangly1024#1465 from tangly1024/feat/wwads

    Feat/wwads

commit b4e40d8
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 18 16:01:02 2023 +0800

    gitbook wwads

commit ed5cbfc
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 18 15:39:05 2023 +0800

    wwads

commit 658b277
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 18 15:35:43 2023 +0800

    万维广告

commit 72eb040
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 18 15:34:54 2023 +0800

    万维广告支持

commit cd4661a
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Wed Aug 16 10:32:07 2023 +0800

    优化百度推送和新增必应推送

commit 92081c6
Merge: 86c2bd6 5458e88
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 15 17:06:37 2023 +0800

    Merge pull request tangly1024#1459 from tangly1024/fix/nobelium-search

    fix nobelium主题搜索框丢失

commit 5458e88
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 15 17:05:47 2023 +0800

    fix nobelium主题搜索框丢失

commit 86c2bd6
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 15 15:55:20 2023 +0800

    更新Dockerfile 版本

commit 454c85f
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 15 14:32:36 2023 +0800

    hotfix-gitbook

commit cad975f
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 15 12:57:56 2023 +0800

    hotfix/gitbook

commit b939538
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 15 12:34:00 2023 +0800

    4.0.13

commit ff30891
Merge: 54c23a1 34eec9f
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 15 12:20:35 2023 +0800

    Merge pull request tangly1024#1439 from Liboq/pikachu-NotionNext

    fix:sidebar在768-1024 显示不正常

commit 54c23a1
Merge: 00215bf 93c4ab2
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 15 12:19:57 2023 +0800

    Merge pull request tangly1024#1440 from Ghlerrix/baidupush

    百度自动推送

commit 00215bf
Merge: b051cd2 493091c
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 15 12:18:53 2023 +0800

    Merge pull request tangly1024#1447 from LooseLi/config-prism

    feat(vercel环境变量): 新增代码主题风格

commit b051cd2
Merge: fc13ac6 cd4db36
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 15 12:17:52 2023 +0800

    Merge pull request tangly1024#1454 from mouyase/optimize_context_menu

    feat: 优化右键菜单,现在右键菜单不会超出窗口了

commit fc13ac6
Merge: 09e9f88 cee3b27
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 15 12:12:13 2023 +0800

    Merge pull request tangly1024#1455 from tangly1024/feat/gitbook-auto-sort

    gitbook 侧边栏支持自动分组自动排序

commit cee3b27
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 15 12:10:03 2023 +0800

    gitbook 侧边栏支持自动分组自动排序

commit cd4db36
Author: 某亚瑟 <i@yojigen.tech>
Date:   Tue Aug 15 11:22:14 2023 +0800

    feat: 优化右键菜单,现在右键菜单不会超出窗口了

commit 34eec9f
Merge: 742cf8a 09e9f88
Author: liboq <99778162+Liboq@users.noreply.github.com>
Date:   Mon Aug 14 14:36:24 2023 +0800

    Merge branch 'tangly1024:main' into pikachu-NotionNext

commit 09e9f88
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Aug 10 16:40:13 2023 +0800

    landing build

commit 89b6ad7
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Aug 10 16:08:53 2023 +0800

    Landing 主题重定向

commit 493091c
Author: LooseLi <1329307562@qq.com>
Date:   Thu Aug 10 11:44:00 2023 +0800

    feat(vercel环境变量): 新增代码主题风格

commit 93c4ab2
Merge: 86f97ea d1268ea
Author: Liu Guanghu <Ghlerrix@outlook.com>
Date:   Thu Aug 10 10:03:45 2023 +0800

    Merge branch 'main' into baidupush

commit 86f97ea
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Wed Aug 9 13:43:30 2023 +0800

    remove on push

commit c2bc576
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Wed Aug 9 13:40:14 2023 +0800

    test workflow_dispatch

commit 742cf8a
Author: Liboq <2661158759@qq.com>
Date:   Wed Aug 9 10:32:08 2023 +0800

    fix:sidebar在768-1024 显示不正常

commit d1268ea
Merge: 23e23a8 f8b2997
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 8 18:53:54 2023 +0800

    Merge pull request tangly1024#1436 from tangly1024/feat/comment-artalk

    支持Artalk评论插件

commit f8b2997
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 8 18:51:34 2023 +0800

    支持Artalk评论插件

commit 23e23a8
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 8 15:22:58 2023 +0800

    随机图片接口优化

commit 2749b73
Merge: 9197b3c 2b7ef74
Author: tangly1024 <mail@tangly1024.com>
Date:   Mon Aug 7 18:27:19 2023 +0800

    Merge pull request tangly1024#1427 from tangly1024/fix/comment-cusdis

    Fix/comment cusdis

commit 2b7ef74
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Aug 7 18:25:02 2023 +0800

    mermaid

commit cfab52c
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Aug 7 18:22:39 2023 +0800

    4.0.12

commit c7b5707
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 16:03:10 2023 +0800

    schedule

commit d5a894b
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:32:03 2023 +0800

    modify

commit 865905d
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:31:33 2023 +0800

    test schedule task

commit fb2eef3
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:27:47 2023 +0800

    modify baidupush.sh

commit 3a1e0ef
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:13:43 2023 +0800

    fix file name

commit b40b8af
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:12:49 2023 +0800

    test api push

commit ffcec4f
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:09:31 2023 +0800

    fix url

commit 279443e
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:08:03 2023 +0800

    modify package.json

commit a13e7b0
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 15:07:04 2023 +0800

    add args

commit bf17775
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 14:56:15 2023 +0800

    install requests

commit 7a3e163
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 14:53:24 2023 +0800

    modify baidupush.yml

commit 770382a
Author: Ghlerrix <ghlerrix@outlook.com>
Date:   Mon Aug 7 14:51:20 2023 +0800

    test action and parse

commit 9197b3c
Merge: 0ee562f aa284a5
Author: tangly1024 <mail@tangly1024.com>
Date:   Mon Aug 7 14:27:46 2023 +0800

    Merge pull request tangly1024#1426 from tangly1024/feat/nobelium-menu

    Nobelium主题菜单优化

commit 0ee562f
Merge: 70cc96d c8ba70f
Author: tangly1024 <mail@tangly1024.com>
Date:   Mon Aug 7 14:23:31 2023 +0800

    Merge pull request tangly1024#1419 from Liboq/pikachu-NotionNext

    fix:example 搜索

commit aa284a5
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Aug 7 14:22:23 2023 +0800

    Nobelium主题菜单调整

commit 70cc96d
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 4 15:50:23 2023 +0800

    remove log

commit 831b847
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 4 15:25:04 2023 +0800

    heo adjacent颜色调整

commit bb02003
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 4 14:40:09 2023 +0800

    heo 样式微调

commit c8ba70f
Author: Liboq <2661158759@qq.com>
Date:   Fri Aug 4 13:53:23 2023 +0800

    fix:example 搜索

commit f075677
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 4 11:40:39 2023 +0800

    修复图片缩放位置

commit 307dd42
Merge: dd5fbc0 37c29c0
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Aug 4 10:22:43 2023 +0800

    Merge pull request tangly1024#1416 from tangly1024/fix/post-lost

    修复文章丢失

commit 37c29c0
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Fri Aug 4 10:22:06 2023 +0800

    修复文章丢失

commit dd5fbc0
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Aug 3 21:26:46 2023 +0800

    修复二级菜单编译bug

commit 0e6359c
Merge: 81938c3 3b96f21
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Aug 3 19:16:44 2023 +0800

    Merge pull request tangly1024#1409 from tangly1024/fix/heo-search-summary

    heo搜索 显示摘要

commit 3b96f21
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Aug 3 19:15:26 2023 +0800

    heo搜索

commit 81938c3
Merge: f6bc592 6caab98
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Aug 3 19:11:34 2023 +0800

    Merge pull request tangly1024#1408 from tangly1024/fix/hexo-comment-close

    FIX heo 评论区关闭

commit 6caab98
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Aug 3 19:10:42 2023 +0800

    FIX heo 评论区关闭

commit f6bc592
Merge: 5867cb6 b498b2f
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Aug 3 15:33:03 2023 +0800

    Merge pull request tangly1024#1402 from tangly1024/feat/webwhiz

    集成WebWhiz

commit b498b2f
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Aug 3 15:15:41 2023 +0800

    集成WebWhiz

commit 5867cb6
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Aug 2 16:46:28 2023 +0800

    update readme

commit 7e03e5f
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Aug 2 16:40:45 2023 +0800

    v4.0.11

commit e91b0a9
Merge: 8a78591 5942d28
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Aug 2 16:39:24 2023 +0800

    Merge pull request tangly1024#1381 from LooseLi/config-copy

    feat: 新增页面防复制功能

commit 5942d28
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Aug 2 16:37:40 2023 +0800

    禁止复制文章功能,附带开关

commit 8a78591
Merge: d7bdd21 8f40b1c
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Aug 2 16:20:33 2023 +0800

    Merge pull request tangly1024#1395 from tangly1024/fix/next-pagination

    修复next主题分页导航bug

commit 8f40b1c
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Aug 2 16:20:00 2023 +0800

    修复next主题分页导航bug

commit d7bdd21
Merge: 587ba56 a937d06
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Aug 2 16:09:06 2023 +0800

    Merge pull request tangly1024#1394 from tangly1024/build/fix

    fix/menu-link-blank

commit a937d06
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Aug 2 16:02:27 2023 +0800

    菜单 _blank 逻辑调整

commit 37fa30d
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Aug 2 15:47:12 2023 +0800

    fb-messager自动显示

commit 587ba56
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 1 22:47:14 2023 +0800

    next: pagination border-t

commit ff2b10a
Merge: b1395e6 2973a2d
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 1 22:36:31 2023 +0800

    Merge pull request tangly1024#1387 from tangly1024/feat/4.0.10

    修复单页嵌套无法打开的问题

commit 2973a2d
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 1 22:36:19 2023 +0800

    4.0.10

commit 952fb4e
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 1 22:33:23 2023 +0800

    修复单页嵌套无法打开的问题

commit b1395e6
Merge: f60af40 f755db7
Author: tangly1024 <mail@tangly1024.com>
Date:   Tue Aug 1 18:58:53 2023 +0800

    Merge pull request tangly1024#1383 from tangly1024/build/fix

    v4.0.9

commit f755db7
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 18:58:35 2023 +0800

    v4.0.9

commit 9278ac8
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 18:46:16 2023 +0800

    facebook page

commit 86fd5ad
Author: LooseLi <1329307562@qq.com>
Date:   Tue Aug 1 18:20:12 2023 +0800

    feat: 新增页面防复制功能

commit 0b477b1
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 17:53:15 2023 +0800

    FB Messenger

commit 8b976ce
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 16:56:19 2023 +0800

    log

commit cb1b15e
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 16:51:39 2023 +0800

    跳转页内链接处理

commit 4b7564e
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 15:58:31 2023 +0800

    Ackee 调整

commit e44a35f
Merge: 3bdb6e4 f60af40
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 14:29:02 2023 +0800

    Merge branch 'main' into build/fix

commit f60af40
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 14:23:44 2023 +0800

    gitbook 归档标签

commit fb4d499
Merge: 570ab5a 91fac55
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 14:17:35 2023 +0800

    Merge branch 'main' of https://github.com/tangly1024/NotionNext

commit 570ab5a
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 14:17:30 2023 +0800

    fix/build-nobelium

commit 3bdb6e4
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 12:47:37 2023 +0800

    facebook

commit 6eb50b1
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 12:47:33 2023 +0800

    isBrowser方法调整

commit 115b43b
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Tue Aug 1 11:48:04 2023 +0800

    ACKEE

commit 0ae88e9
Author: tangly1024 <mail@tangly1024.com>
Date:   Mon Jul 31 22:17:10 2023 +0800

    Ackee

commit c7f700e
Author: tangly1024 <mail@tangly1024.com>
Date:   Mon Jul 31 21:54:43 2023 +0800

    CusDis组件 CDN处理

commit 187b173
Author: tangly1024 <mail@tangly1024.com>
Date:   Mon Jul 31 21:30:38 2023 +0800

    qrcode 改为cdn

commit 91fac55
Author: tangly1024 <mail@tangly1024.com>
Date:   Mon Jul 31 20:46:21 2023 +0800

    主题提示

commit b7c84d5
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Jul 31 18:59:21 2023 +0800

    移除冲突组件,允许用npm打包

commit 72dbf54
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Jul 31 16:57:42 2023 +0800

    fix build

commit 3faf956
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Jul 31 16:56:52 2023 +0800

    fix build

commit 86063ae
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Jul 31 16:53:17 2023 +0800

    landing

commit 943e9f9
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Jul 31 16:07:54 2023 +0800

    fix build

commit ab11110
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Mon Jul 31 15:38:18 2023 +0800

    推荐文章,支持时间倒序

commit 386edbd
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 21:44:36 2023 +0800

    gitbook

commit 5cce8c5
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 16:00:54 2023 +0800

    fix algolia ui

commit 6937b68
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 15:27:36 2023 +0800

    v4.0.8

commit 4983108
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 15:22:09 2023 +0800

    完善编译,数据库支持多视图排序

commit b4d1a1a
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 14:41:48 2023 +0800

    fix build

commit f1e68eb
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 14:08:06 2023 +0800

    fix/build

commit 6cfc8ae
Merge: 78183c4 fd6449e
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 13:58:51 2023 +0800

    Merge pull request tangly1024#1371 from tangly1024/feat/heo-top-posts

    Feat/heo top posts

commit 78183c4
Merge: aca80a7 b230617
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 13:58:27 2023 +0800

    Merge pull request tangly1024#1370 from tangly1024/fix/hexo-overflow-x

    fix hexo overflow-x

commit b230617
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 13:56:08 2023 +0800

    fix hexo overflow-x

commit fd6449e
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 13:40:34 2023 +0800

    v4.0.7

commit a9be55f
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 13:39:12 2023 +0800

    heo mobile hero style

commit 595a0bd
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 12:45:44 2023 +0800

    打包

commit 2619aba
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 12:32:33 2023 +0800

    推荐文章

commit ec26ab8
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 12:31:36 2023 +0800

    heo 主题置顶推荐文章

commit d1dfd32
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 11:52:14 2023 +0800

    Common

commit 1353acf
Author: tangly1024 <mail@tangly1024.com>
Date:   Sun Jul 30 11:44:18 2023 +0800

    整理filterNavPages

commit aca80a7
Author: tangly1024 <mail@tangly1024.com>
Date:   Sat Jul 29 17:00:52 2023 +0800

    fix

commit c5ba9a8
Author: tangly1024 <mail@tangly1024.com>
Date:   Sat Jul 29 16:46:36 2023 +0800

    algolia日志

commit 7841b55
Author: tangly1024 <mail@tangly1024.com>
Date:   Sat Jul 29 16:38:49 2023 +0800

    lastEditTime 字段名调整;修改algolia逻辑

commit c13eb5e
Author: tangly1024 <mail@tangly1024.com>
Date:   Sat Jul 29 13:10:47 2023 +0800

    algolia 调整索引

commit c592651
Author: tangly1024 <mail@tangly1024.com>
Date:   Sat Jul 29 11:39:53 2023 +0800

    fix/build

commit e1976aa
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 20:45:46 2023 +0800

    减少日志

commit beeed7f
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 20:42:35 2023 +0800

    合并CommenHead;
    调整Algolia样式

commit 66f568a
Merge: a29271a 76c29aa
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 17:18:57 2023 +0800

    Merge branch 'main' of https://github.com/tangly1024/NotionNext

commit a29271a
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 17:18:52 2023 +0800

    fix/gitbook-nav-scroll-height

commit 76c29aa
Merge: 70d6f9b af2a5b3
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 17:00:30 2023 +0800

    Merge pull request tangly1024#1362 from tangly1024/fix/dark-mode

    保存用户深色模式

commit af2a5b3
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 17:00:02 2023 +0800

    保存用户深色模式

commit 70d6f9b
Merge: beb6787 82e18a4
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 16:35:38 2023 +0800

    Merge pull request tangly1024#1360 from Vixcity/wx

    feat/是否显示开始阅读

commit 82e18a4
Merge: 298f91d 530eb6e
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 16:32:06 2023 +0800

    Merge branch 'wx' of https://github.com/vixcity/notionblog into pr/Vixcity/1360

commit 298f91d
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 16:30:48 2023 +0800

    config.js

commit 08218c4
Author: tangly1024 <mail@tangly1024.com>
Date:   Fri Jul 28 16:23:49 2023 +0800

    是否显示开始阅读按钮

commit 530eb6e
Author: Vixcity <2091283625@qq.com>
Date:   Fri Jul 28 15:51:21 2023 +0800

    .

commit 4893329
Merge: 7a5255f 20719d8
Author: Vixcity <2091283625@qq.com>
Date:   Fri Jul 28 15:48:42 2023 +0800

    是否显示开始阅读按钮

commit 7a5255f
Merge: f9fe90b beb6787
Author: Vixcity <2091283625@qq.com>
Date:   Fri Jul 28 15:46:04 2023 +0800

    合并全部代码

commit 20719d8
Author: Vixcity <2091283625@qq.com>
Date:   Fri Jul 28 15:36:27 2023 +0800

    关闭开始阅读文字

commit 3caab31
Author: Vixcity <2091283625@qq.com>
Date:   Fri Jul 28 15:30:33 2023 +0800

    关闭 开始阅读

commit 668a494
Author: Vixcity <2091283625@qq.com>
Date:   Fri Jul 28 15:21:56 2023 +0800

    再次尝试解决冲突

commit 906417d
Merge: 890b308 beb6787
Author: Vixcity <2091283625@qq.com>
Date:   Fri Jul 28 14:54:30 2023 +0800

    解决冲突

commit beb6787
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Jul 27 18:37:03 2023 +0800

    v4.0.6

commit 9e62cfd
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Jul 27 18:36:47 2023 +0800

    small fix

commit dffd709
Merge: a434453 2a83af3
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Jul 27 18:33:15 2023 +0800

    Merge pull request tangly1024#1355 from tangly1024/heo/post-last-edite-time

    heo 添加最后更新日期,修复归档日期bug

commit 2a83af3
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Jul 27 18:32:21 2023 +0800

    heo 添加最后更新日期,修复归档日期bug

commit a434453
Merge: a3f7daf 75f2cc0
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Jul 27 18:20:28 2023 +0800

    Merge pull request tangly1024#1354 from tangly1024/fix/random-post-jump

    fix 随便逛逛两次点击报错

commit 75f2cc0
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Jul 27 18:20:06 2023 +0800

    fix 随便逛逛两次点击报错

commit a3f7daf
Merge: 488d48e 5a4122d
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Jul 27 18:13:40 2023 +0800

    Merge pull request tangly1024#1353 from tangly1024/fix/heo-style

    Fix/heo style

commit 5a4122d
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Jul 27 18:13:11 2023 +0800

    logo 图标消失

commit 8bbda2c
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Jul 27 18:05:02 2023 +0800

    圆角漏出

commit 488d48e
Merge: b9f52f3 adb6ec2
Author: tangly1024 <mail@tangly1024.com>
Date:   Thu Jul 27 17:50:54 2023 +0800

    Merge pull request tangly1024#1351 from tangly1024/fix/next-post-scroll

    二段滑动bug

commit adb6ec2
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Thu Jul 27 17:50:23 2023 +0800

    二段滑动bug

commit b9f52f3
Merge: 5364e59 155d5ea
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Jul 26 18:47:20 2023 +0800

    Merge pull request tangly1024#1257 from jxpeng98/enhance-code-highlight-switch

    Enhance code highlight switch

commit 155d5ea
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Jul 26 18:44:45 2023 +0800

    code 调整

commit 5cf74fc
Merge: fcd4a69 7d8e4c4
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Jul 26 18:43:34 2023 +0800

    Merge branch 'main' into pr/jxpeng98/1257

commit fcd4a69
Merge: 947fd1d 86e314a
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Jul 26 18:06:10 2023 +0800

    Merge branch 'enhance-code-highlight-switch' of https://github.com/jxpeng98/notionnext into pr/jxpeng98/1257

commit 947fd1d
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Jul 26 17:54:32 2023 +0800

    代码主题切换

commit c3ccb7f
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Jul 26 17:53:26 2023 +0800

    深色浅色模式切换

commit 5364e59
Merge: 235390b 205e87c
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Jul 26 17:40:12 2023 +0800

    Merge pull request tangly1024#1338 from Liboq/pikachu-NotionNext

    fix:QQ分享按钮无效

commit 235390b
Merge: f6581d2 5ecfd69
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Jul 26 17:35:51 2023 +0800

    Merge pull request tangly1024#1341 from LooseLi/demo-blog-config

    Demo blog config

commit f6581d2
Merge: 7d8e4c4 3b2ad33
Author: tangly1024 <mail@tangly1024.com>
Date:   Wed Jul 26 17:34:15 2023 +0800

    Merge pull request tangly1024#1344 from bpking1/dev

    fix medium 移动端目录溢出

commit 7d8e4c4
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Jul 26 11:58:03 2023 +0800

    Landing

commit e75051b
Author: tangly1024.com <tlyong1992@hotmail.com>
Date:   Wed Jul 26 10:21:14 2023 +0800

    Home 微调

commit 3b2ad33
Author: bpking1 <yihe.hejie@gmail.com>
Date:   Wed Jul 26 08:20:47 2023 +0800

    fix medium 移动端目录溢出

commit 5ecfd69
Author: LooseLi <1329307562@qq.com>
Date:   Tue Jul 25 15:32:20 2023 +0800

    feat: 新增展示网站阅读量、访问数的Vercel环境变量

commit 775afc0
Author: LooseLi <1329307562@qq.com>
Date:   Tue Jul 25 15:27:43 2023 +0800

    fix: 文章信息头日期格式统一

commit 205e87c
Author: Liboq <2661158759@qq.com>
Date:   Mon Jul 24 21:48:34 2023 +0800

    fix:QQ分享按钮无效

commit 86e314a
Author: Jiaxin Peng <peng9498@gmail.com>
Date:   Tue Jul 11 00:50:40 2023 +0100

    update description

commit d92e2ba
Author: Jiaxin Peng <peng9498@gmail.com>
Date:   Tue Jul 11 00:44:12 2023 +0100

    add code highlight theme changed with theme mode

commit 890b308
Merge: 6f8bc27 2db7b47
Author: Vixcity <57704177+Vixcity@users.noreply.github.com>
Date:   Thu May 4 09:31:33 2023 +0800

    Merge branch 'tangly1024:main' into main

commit 6f8bc27
Author: Vixcity <2091283625@qq.com>
Date:   Thu May 4 09:30:30 2023 +0800

    关闭樱花特效

commit f9fe90b
Merge: 3e86cbf f9a08ac
Author: Vixcity <2091283625@qq.com>
Date:   Mon Apr 24 11:07:00 2023 +0800

    Merge branch 'main' into wx

commit f9a08ac
Merge: d15c463 19b1b43
Author: Vixcity <57704177+Vixcity@users.noreply.github.com>
Date:   Mon Apr 24 11:06:28 2023 +0800

    Merge branch 'tangly1024:main' into main

commit 3e86cbf
Merge: 1481a4a d15c463
Author: Vixcity <2091283625@qq.com>
Date:   Mon Apr 24 11:06:01 2023 +0800

    提交

commit d15c463
Author: Vixcity <2091283625@qq.com>
Date:   Thu Apr 20 10:12:45 2023 +0800

    提交

commit 1481a4a
Author: Vixcity <2091283625@qq.com>
Date:   Wed Mar 22 17:04:56 2023 +0800

    提交

commit 315b612
Merge: fd6fa49 720f2f7
Author: Vixcity <2091283625@qq.com>
Date:   Wed Mar 22 17:04:35 2023 +0800

    提交

commit fd6fa49
Merge: b550a25 440fcff
Author: Vixcity <2091283625@qq.com>
Date:   Thu Mar 2 10:13:59 2023 +0800

    修改blog.config.js冲突

commit b550a25
Author: Vixcity <2091283625@qq.com>
Date:   Wed Feb 22 22:49:06 2023 +0800

    提交
  • Loading branch information
Han-Orz committed Aug 25, 2023
1 parent bff15fe commit 597a591
Show file tree
Hide file tree
Showing 36 changed files with 390 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .env.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# 环境变量 @see https://www.nextjs.cn/docs/basic-features/environment-variables
NEXT_PUBLIC_VERSION=4.0.12
NEXT_PUBLIC_VERSION=4.0.13
42 changes: 42 additions & 0 deletions .github/workflows/pushUrl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
## 利用GitHub Actions每天定时给百度推送链接,提高收录率 ##

name: pushUrl

# 两种触发方式:一、push代码,二、每天国际标准时间23点(北京时间+8即早上7点)运行
on:
push:
schedule:
- cron: '0 23 * * *' # https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
workflow_dispatch:
inputs:
unconditional-invoking:
description: 'push url unconditionally'
type: boolean
required: true
default: true

# on:
# schedule:
# - cron: '*/5 * * * *' # 每5分钟一次,测试用

jobs:
bot:
runs-on: ubuntu-latest # 运行环境为最新版的Ubuntu
steps:
- name: 'Checkout codes' # 步骤一,获取仓库代码
uses: actions/checkout@v2
# - name: 'Run baiduPush' # 步骤二,执行sh命令文件
# run: npm install && npm run baiduPush # 运行目录是仓库根目录
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: install requests
run: pip install requests

- name: baiduPush
run: python pushUrl.py ${{ secrets.URL }} --baidu_token ${{ secrets.BAIDU_TOKEN }}

- name: bingPush
run: python pushUrl.py ${{ secrets.URL }} --bing_api_key ${{ secrets.BING_API_KEY }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
ARG NOTION_PAGE_ID
# Install dependencies only when needed
FROM node:14-alpine AS deps
FROM node:18-alpine3.18 AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:14-alpine AS builder
FROM node:18-alpine3.18 AS builder
ARG NOTION_PAGE_ID
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
Expand Down
20 changes: 17 additions & 3 deletions blog.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const BLOG = {
BIO: process.env.NEXT_PUBLIC_BIO || '晴,无事——伟大的吃饭表演艺术家。', // 作者简介
LINK: process.env.NEXT_PUBLIC_LINK || 'https://xn--7ct.ink', // 网站地址
KEYWORDS: process.env.NEXT_PUBLIC_KEYWORD || 'Notion, 博客', // 网站关键词 英文逗号隔开

// 社交链接,不需要可留空白,例如 CONTACT_WEIBO:''
CONTACT_EMAIL: process.env.NEXT_PUBLIC_CONTACT_EMAIL || 'han.orz@寒.ink', // 邮箱地址 例如mail@tangly1024.com
CONTACT_WEIBO: process.env.NEXT_PUBLIC_CONTACT_WEIBO || '', // 你的微博个人主页
Expand Down Expand Up @@ -110,10 +111,10 @@ const BLOG = {
PRISM_JS_AUTO_LOADER: 'https://npm.elemecdn.com/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js',

// 代码主题 @see https://github.com/PrismJS/prism-themes
PRISM_THEME_PREFIX_PATH: 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-okaidia.css', // 代码块默认主题
PRISM_THEME_PREFIX_PATH: process.env.NEXT_PUBLIC_PRISM_THEME_PREFIX_PATH || 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-okaidia.css', // 代码块默认主题
PRISM_THEME_SWITCH: process.env.NEXT_PUBLIC_PRISM_THEME_SWITCH || true, // 是否开启浅色/深色模式代码主题切换; 开启后将显示以下两个主题
PRISM_THEME_LIGHT_PATH: 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-solarizedlight.css', // 浅色模式主题
PRISM_THEME_DARK_PATH: 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-okaidia.min.css', // 深色模式主题
PRISM_THEME_LIGHT_PATH: process.env.NEXT_PUBLIC_PRISM_THEME_LIGHT_PATH || 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-solarizedlight.css', // 浅色模式主题
PRISM_THEME_DARK_PATH: process.env.NEXT_PUBLIC_PRISM_THEME_DARK_PATH || 'https://cdn.jsdelivr.net/npm/prismjs@1.29.0/themes/prism-okaidia.min.css', // 深色模式主题

CODE_MAC_BAR: process.env.NEXT_PUBLIC_CODE_MAC_BAR || true, // 代码左上角显示mac的红黄绿图标
CODE_LINE_NUMBERS: process.env.NEXT_PUBLIC_CODE_LINE_NUMBERS || false, // 是否显示行号
Expand Down Expand Up @@ -232,6 +233,11 @@ const BLOG = {
// ********挂件组件相关********
// ----> 评论互动 可同时开启多个支持 WALINE VALINE GISCUS CUSDIS UTTERRANCES GITALK

// artalk 评论插件
COMMENT_ARTALK_SERVER: process.env.NEXT_PUBLIC_COMMENT_ARTALK_SERVER || '', // ArtalkServert后端地址 https://artalk.js.org/guide/deploy.html
COMMENT_ARTALK_JS: process.env.NEXT_PUBLIC_COMMENT_ARTALK_JS || 'https://cdnjs.cloudflare.com/ajax/libs/artalk/2.5.5/Artalk.js', // ArtalkServert js cdn
COMMENT_ARTALK_CSS: process.env.NEXT_PUBLIC_COMMENT_ARTALK_CSS || 'https://cdnjs.cloudflare.com/ajax/libs/artalk/2.5.5/Artalk.css', // ArtalkServert css cdn

// twikoo
COMMENT_TWIKOO_ENV_ID: process.env.NEXT_PUBLIC_COMMENT_ENV_ID || '', // TWIKOO后端地址 腾讯云环境填envId;Vercel环境填域名,教程:https://tangly1024.com/article/notionnext-twikoo
COMMENT_TWIKOO_COUNT_ENABLE: process.env.NEXT_PUBLIC_COMMENT_TWIKOO_COUNT_ENABLE || false, // 博客列表是否显示评论数
Expand Down Expand Up @@ -330,6 +336,8 @@ const BLOG = {

// <---- 站点统计

// START---->营收相关

// 谷歌广告
ADSENSE_GOOGLE_ID: process.env.NEXT_PUBLIC_ADSENSE_GOOGLE_ID || '', // 谷歌广告ID e.g ca-pub-xxxxxxxxxxxxxxxx
ADSENSE_GOOGLE_TEST: process.env.NEXT_PUBLIC_ADSENSE_GOOGLE_TEST || false, // 谷歌广告ID测试模式,这种模式获取假的测试广告,用于开发 https://www.tangly1024.com/article/local-dev-google-adsense
Expand All @@ -338,6 +346,12 @@ const BLOG = {
ADSENSE_GOOGLE_SLOT_NATIVE: process.env.NEXT_PUBLIC_ADSENSE_GOOGLE_SLOT_NATIVE || '4980048999', // Google AdScene>广告>按单元广告>新建原生广告
ADSENSE_GOOGLE_SLOT_AUTO: process.env.NEXT_PUBLIC_ADSENSE_GOOGLE_SLOT_AUTO || '8807314373', // Google AdScene>广告>按单元广告>新建展示广告 (自动广告)

// 万维广告
AD_WWADS_ID: process.env.NEXT_PUBLIC_WWAD_ID || null, // https://wwads.cn/ 创建您的万维广告单元ID
AD_WWADS_BLOCK_DETECT: process.env.NEXT_PUBLIC_WWADS_AD_BLOCK_DETECT || false, // 是否开启WWADS广告屏蔽插件检测,开启后会在广告位上以文字提示 @see https://github.com/bytegravity/whitelist-wwads

// END<----营收相关

// 自定义配置notion数据库字段名
NOTION_PROPERTY_NAME: {
password: process.env.NEXT_PUBLIC_NOTION_PROPERTY_PASSWORD || '密码', // 默认为password
Expand Down
4 changes: 2 additions & 2 deletions components/Ackee.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const handleAckee = async function(pathname, environment, options = {}) {
await loadExternalResource(BLOG.ANALYTICS_ACKEE_TRACKER, 'js')
const ackeeTracker = window.ackeeTracker

const instance = ackeeTracker.create(environment.server, options)
const instance = ackeeTracker?.create(environment.server, options)

if (instance == null) {
console.warn('Skipped record creation because useAckee has been called in a non-browser environment')
Expand All @@ -73,7 +73,7 @@ const handleAckee = async function(pathname, environment, options = {}) {
return
}

const attributes = ackeeTracker.attributes(options.detailed)
const attributes = ackeeTracker?.attributes(options.detailed)
const url = new URL(pathname, location)

return instance.record(environment.domainId, {
Expand Down
40 changes: 40 additions & 0 deletions components/AdBlockDetect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { useEffect } from 'react'

/**
* 检测广告插件
* @returns
*/
export default function AdBlockDetect() {
useEffect(() => {
// 如果检测到广告屏蔽插件
function ABDetected() {
if (!document) {
return
}
const wwadsCns = document.getElementsByClassName('wwads-cn')
if (wwadsCns && wwadsCns.length > 0) {
for (const wwadsCn of wwadsCns) {
wwadsCn.insertAdjacentHTML('beforeend', "<style>.wwads-horizontal,.wwads-vertical{background-color:#f4f8fa;padding:5px;min-height:120px;margin-top:20px;box-sizing:border-box;border-radius:3px;font-family:sans-serif;display:flex;min-width:150px;position:relative;overflow:hidden;}.wwads-horizontal{flex-wrap:wrap;justify-content:center}.wwads-vertical{flex-direction:column;align-items:center;padding-bottom:32px}.wwads-horizontal a,.wwads-vertical a{text-decoration:none}.wwads-horizontal .wwads-img,.wwads-vertical .wwads-img{margin:5px}.wwads-horizontal .wwads-content,.wwads-vertical .wwads-content{margin:5px}.wwads-horizontal .wwads-content{flex:130px}.wwads-vertical .wwads-content{margin-top:10px}.wwads-horizontal .wwads-text,.wwads-content .wwads-text{font-size:14px;line-height:1.4;color:#0e1011;-webkit-font-smoothing:antialiased}.wwads-horizontal .wwads-poweredby,.wwads-vertical .wwads-poweredby{display:block;font-size:11px;color:#a6b7bf;margin-top:1em}.wwads-vertical .wwads-poweredby{position:absolute;left:10px;bottom:10px}.wwads-horizontal .wwads-poweredby span,.wwads-vertical .wwads-poweredby span{transition:all 0.2s ease-in-out;margin-left:-1em}.wwads-horizontal .wwads-poweredby span:first-child,.wwads-vertical .wwads-poweredby span:first-child{opacity:0}.wwads-horizontal:hover .wwads-poweredby span,.wwads-vertical:hover .wwads-poweredby span{opacity:1;margin-left:0}.wwads-horizontal .wwads-hide,.wwads-vertical .wwads-hide{position:absolute;right:-23px;bottom:-23px;width:46px;height:46px;border-radius:23px;transition:all 0.3s ease-in-out;cursor:pointer;}.wwads-horizontal .wwads-hide:hover,.wwads-vertical .wwads-hide:hover{background:rgb(0 0 0 /0.05)}.wwads-horizontal .wwads-hide svg,.wwads-vertical .wwads-hide svg{position:absolute;left:10px;top:10px;fill:#a6b7bf}.wwads-horizontal .wwads-hide:hover svg,.wwads-vertical .wwads-hide:hover svg{fill:#3E4546}</style><a href='https://wwads.cn/page/whitelist-wwads' class='wwads-img' target='_blank' rel='nofollow'><img src='https://creatives-1301677708.file.myqcloud.com/images/placeholder/wwads-friendly-ads.png' width='130'></a><div class='wwads-content'><a href='https://wwads.cn/page/whitelist-wwads' class='wwads-text' target='_blank' rel='nofollow'>为了本站的长期运营,请将我们的网站加入广告拦截器的白名单,感谢您的支持!</a><a href='https://wwads.cn/page/end-user-privacy' class='wwads-poweredby' title='万维广告 ~ 让广告更优雅,且有用' target='_blank'><span>万维</span><span>广告</span></a></div><a class='wwads-hide' onclick='parentNode.remove()' title='隐藏广告'><svg xmlns='http://www.w3.org/2000/svg' width='6' height='7'><path d='M.879.672L3 2.793 5.121.672a.5.5 0 11.707.707L3.708 3.5l2.12 2.121a.5.5 0 11-.707.707l-2.12-2.12-2.122 2.12a.5.5 0 11-.707-.707l2.121-2.12L.172 1.378A.5.5 0 01.879.672z'></path></svg></a>")
}
}
};

// check document ready
function docReady(t) {
document.readyState === 'complete' ||
document.readyState === 'interactive'
? setTimeout(t, 1)
: document.addEventListener('DOMContentLoaded', t)
}

// check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading)
docReady(function () {
setTimeout(function () {
if (window._AdBlockInit === undefined) {
ABDetected()
}
}, 3000)
})
}, [])
return null
}
30 changes: 30 additions & 0 deletions components/Artalk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import BLOG from '@/blog.config'
import { loadExternalResource } from '@/lib/utils'
// import { loadExternalResource } from '@/lib/utils'
import { useEffect } from 'react'

/**
* Giscus评论 @see https://giscus.app/zh-CN
* Contribute by @txs https://github.com/txs/NotionNext/commit/1bf7179d0af21fb433e4c7773504f244998678cb
* @returns {JSX.Element}
* @constructor
*/

const Artalk = ({ siteInfo }) => {
useEffect(() => {
loadExternalResource(BLOG.COMMENT_ARTALK_CSS, 'css')
window?.Artalk?.init({
server: BLOG.COMMENT_ARTALK_SERVER, // 后端地址
el: '#artalk', // 容器元素
locale: BLOG.LANG,
// pageKey: '/post/1', // 固定链接 (留空自动获取)
// pageTitle: '关于引入 Artalk 的这档子事', // 页面标题 (留空自动获取)
site: siteInfo?.title // 你的站点名
})
}, [])
return (
<div id="artalk"></div>
)
}

export default Artalk
6 changes: 5 additions & 1 deletion components/Comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import dynamic from 'next/dynamic'
import Tabs from '@/components/Tabs'
import { isBrowser } from '@/lib/utils'
import { useRouter } from 'next/router'
import Artalk from './Artalk'

const WalineComponent = dynamic(
() => {
Expand Down Expand Up @@ -66,7 +67,7 @@ BLOG.COMMENT_GISCUS_REPO || BLOG.COMMENT_CUSDIS_APP_ID || BLOG.COMMENT_UTTERRANC
* @param {*} param0
* @returns
*/
const Comment = ({ frontMatter, className }) => {
const Comment = ({ siteInfo, frontMatter, className }) => {
const router = useRouter()

if (isBrowser && ('giscus' in router.query || router.query.target === 'comment')) {
Expand All @@ -84,6 +85,9 @@ const Comment = ({ frontMatter, className }) => {
return (
<div key={frontMatter?.id} id='comment' className={`comment mt-5 text-gray-800 dark:text-gray-300 ${className || ''}`}>
<Tabs>
{BLOG.COMMENT_ARTALK_SERVER && (<div key='Artalk'>
<Artalk siteInfo={siteInfo} />
</div>)}

{BLOG.COMMENT_TWIKOO_ENV_ID && (<div key='Twikoo'>
<TwikooCompenent />
Expand Down
4 changes: 4 additions & 0 deletions components/CommonScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ const CommonScript = () => {
/>
</>)}

{BLOG.AD_WWADS_ID && <script type="text/javascript" charSet="UTF-8" src="https://cdn.wwads.cn/js/makemoney.js" async></script>}

{BLOG.COMMENT_CUSDIS_APP_ID && <script defer src={`https://cusdis.com/js/widget/lang/${BLOG.LANG.toLowerCase()}.js`} />}

{BLOG.COMMENT_TWIKOO_ENV_ID && <script defer src={BLOG.COMMENT_TWIKOO_CDN_URL}/> }

{BLOG.COMMENT_ARTALK_SERVER && <script defer src={BLOG.COMMENT_ARTALK_JS}/> }

{BLOG.COMMENT_TIDIO_ID && <script async src={`//code.tidio.co/${BLOG.COMMENT_TIDIO_ID}.js`} />}

{/* gitter聊天室 */}
Expand Down
18 changes: 15 additions & 3 deletions components/CustomContextMenu.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useEffect, useState, useRef } from 'react'
import { useEffect, useState, useRef, useLayoutEffect } from 'react'
import { useGlobal } from '@/lib/global'
import { saveDarkModeToCookies, THEMES } from '@/themes/theme'
import BLOG from '@/blog.config'
import useWindowSize from '@/hooks/useWindowSize'

/**
* 自定义右键菜单
Expand All @@ -15,6 +16,9 @@ export default function CustomContextMenu(props) {
const [show, setShow] = useState(false)
const { isDarkMode, updateDarkMode, locale } = useGlobal()
const menuRef = useRef(null)
const windowSize = useWindowSize()
const [width, setWidth] = useState(0)
const [height, setHeight] = useState(0)

const { latestPosts } = props
const router = useRouter()
Expand All @@ -27,10 +31,18 @@ export default function CustomContextMenu(props) {
router.push(`${BLOG.SUB_PATH}/${randomPost?.slug}`)
}

useLayoutEffect(() => {
setWidth(menuRef.current.offsetWidth)
setHeight(menuRef.current.offsetHeight)
}, [])

useEffect(() => {
const handleContextMenu = (event) => {
event.preventDefault()
setPosition({ y: `${event.clientY}px`, x: `${event.clientX}px` })
// 计算点击位置加菜单宽高是否超出屏幕,如果超出则贴边弹出
const x = (event.clientX < windowSize.width - width) ? event.clientX : windowSize.width - width
const y = (event.clientY < windowSize.height - height) ? event.clientY : windowSize.height - height
setPosition({ y: `${y}px`, x: `${x}px` })
setShow(true)
}

Expand All @@ -47,7 +59,7 @@ export default function CustomContextMenu(props) {
window.removeEventListener('contextmenu', handleContextMenu)
window.removeEventListener('click', handleClick)
}
}, [])
}, [windowSize])

function handleBack() {
window.history.back()
Expand Down
3 changes: 2 additions & 1 deletion components/ExternalPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Messenger = dynamic(() => import('@/components/FacebookMessenger'), { ssr:
const VConsole = dynamic(() => import('@/components/VConsole'), { ssr: false })
const CustomContextMenu = dynamic(() => import('@/components/CustomContextMenu'), { ssr: false })
const DisableCopy = dynamic(() => import('@/components/DisableCopy'), { ssr: false })

const AdBlockDetect = dynamic(() => import('@/components/AdBlockDetect'), { ssr: false })
/**
* 各种第三方组件
* @param {*} props
Expand All @@ -59,6 +59,7 @@ const ExternalPlugin = (props) => {
{JSON.parse(BLOG.CUSTOM_RIGHT_CLICK_CONTEXT_MENU) && <CustomContextMenu {...props} />}
{!JSON.parse(BLOG.CAN_COPY) && <DisableCopy/>}
{JSON.parse(BLOG.WEB_WHIZ_ENABLED) && <WebWhiz/>}
{JSON.parse(BLOG.AD_WWADS_BLOCK_DETECT) && <AdBlockDetect/>}
<VConsole/>
</>
}
Expand Down
5 changes: 0 additions & 5 deletions components/GoogleAdsense.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ import { useEffect } from 'react'
*/
export default function GoogleAdsense() {
const initGoogleAdsense = () => {
// GoogleAdsense 本地开发请加入 data-adbreak-test="on"
// {BLOG.ADSENSE_GOOGLE_ID && <script async src={`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${BLOG.ADSENSE_GOOGLE_ID}`}
// crossOrigin="anonymous" />}

loadExternalResource(`https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=${BLOG.ADSENSE_GOOGLE_ID}`, 'js').then(url => {
setTimeout(() => {
const ads = document.getElementsByClassName('adsbygoogle')
Expand All @@ -21,7 +17,6 @@ export default function GoogleAdsense() {
for (let i = 0; i <= ads.length; i++) {
try {
adsbygoogle.push(ads[i])
// console.log('adsbygoogle', i, ads[i], adsbygoogle)
} catch (e) {

}
Expand Down
2 changes: 1 addition & 1 deletion components/QrCode.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function QrCode({ value }) {
colorLight: '#ffffff',
correctLevel: QRCode.CorrectLevel.H
})
console.log('二维码', qrcode, value)
// console.log('二维码', qrcode, value)
})
return () => {
if (qrcode) {
Expand Down
2 changes: 1 addition & 1 deletion components/SideBarDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SideBarDrawer = ({ children, isOpen, onOpen, onClose, className }) => {
}
}

return <div id='sidebar-wrapper' className={' block md:hidden top-0 ' + className }>
return <div id='sidebar-wrapper' className={' block lg:hidden top-0 ' + className }>
<div id="sidebar-drawer" className={`${isOpen ? 'ml-0 w-60 visible' : '-ml-60 max-w-side invisible'} bg-white dark:bg-gray-900 shadow-black shadow-lg flex flex-col duration-300 fixed h-full left-0 overflow-y-scroll scroll-hidden top-0 z-30`}>
{children}
</div>
Expand Down
18 changes: 18 additions & 0 deletions components/WWAds.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react'
import BLOG from '@/blog.config'

/**
* 万维广告插件
* @param {string} orientation - 广告方向,可以是 'vertical' 或 'horizontal'
* @param {boolean} sticky - 是否粘性定位
* @returns {JSX.Element | null} - 返回渲染的 JSX 元素或 null
*/
export default function WWAds({ orientation = 'vertical', sticky = false, className }) {
if (!JSON.parse(BLOG.AD_WWADS_ID)) {
return null
}

return (
<div className={`wwads-cn ${orientation === 'vertical' ? 'wwads-vertical' : 'wwads-horizontal'} ${sticky ? 'wwads-sticky' : ''} z-30 ${className || ''}`} data-id={BLOG.AD_WWADS_ID}></div>
)
}

0 comments on commit 597a591

Please sign in to comment.