diff --git a/_config.yml b/_config.yml index b4761c6..6dd44af 100644 --- a/_config.yml +++ b/_config.yml @@ -795,6 +795,22 @@ artitalk: appKey: option: +# HexoPlusPlus All home +# see https://hexoplusplus.js.org +hexoplusplus: + enable: false + domain: + talk: + hpptalk: https://cdn.jsdelivr.net/gh/HexoPlusPlus/HexoPlusPlus@1.1.0/talk_user.js # Here should be the limit must be written version number + hpptalk_css: https://cdn.jsdelivr.net/gh/HexoPlusPlus/HexoPlusPlus@1.1.0/talk.css # Here should be the limit must be written version number + limit: 0 + start: 0 + themecss: # Default config: https://cdn.jsdelivr.net/gh/HexoPlusPlus/CDN@master/theme/hpp_user_talk/Butter_Fly_1.css + option: + + info: + enable: false + # Pjax [Beta] # It may contain bugs and unstable, give feedback when you find the bugs. # https://github.com/MoOx/pjax diff --git a/layout/includes/head.pug b/layout/includes/head.pug index 35b95c3..8010cae 100644 --- a/layout/includes/head.pug +++ b/layout/includes/head.pug @@ -49,6 +49,10 @@ if (theme.pwa && theme.pwa.enable) link(rel='stylesheet', href=url_for(theme.CDN.main_css)) link(rel='stylesheet', href=url_for(theme.CDN.fontawesome) media="print" onload="this.media='all'") +if theme.hexoplusplus.enable + script(src=url_for(theme.hexoplusplus.talk.hpptalk)) + link(rel='stylesheet', href=url_for(theme.hexoplusplus.talk.hpptalk_css)) + if (theme.snackbar && theme.snackbar.enable) link(rel='stylesheet', href=url_for(theme.CDN.snackbar_css) media="print" onload="this.media='all'") diff --git a/layout/includes/page/hpptalk.pug b/layout/includes/page/hpptalk.pug new file mode 100644 index 0000000..12b52ad --- /dev/null +++ b/layout/includes/page/hpptalk.pug @@ -0,0 +1,12 @@ +if top_img === false + h1.page-title= page.title + +#hpp_talk +script. + + new hpp_talk({ + id:"hpp_talk", + domain: "!{theme.hexoplusplus.domain}", + limit: !{theme.hexoplusplus.talk.limit}, + start: !{theme.hexoplusplus.talk.start} + }); \ No newline at end of file diff --git a/layout/page.pug b/layout/page.pug index 7287546..0f2733c 100644 --- a/layout/page.pug +++ b/layout/page.pug @@ -11,6 +11,8 @@ block content include includes/page/categories.pug when 'artitalk' include includes/page/artitalk.pug + when 'hpptalk' + include includes/page/hpptalk.pug default include includes/page/default-page.pug diff --git a/package.json b/package.json index 4421098..dd8f300 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-butterfly", - "version": "3.6.2", + "version": "3.6.3", "description": "A Simple and Card UI Design theme for Hexo", "main": "package.json", "scripts": {