removeif / blog_comment

personal blog comment.
https://removeif.github.io/
1 stars 2 forks source link

博客源码分享 - 辣椒の酱 #59

Open removeif opened 4 years ago

removeif commented 4 years ago

https://removeif.github.io/theme/%E5%8D%9A%E5%AE%A2%E6%BA%90%E7%A0%81%E5%88%86%E4%BA%AB.html

说在前面博客在icarus主题之上参照各网友博客,以及自己的一些想法做出的一些修改以及增加部分新元素。膜拜和感谢所有模块的原作者,orz👻,辛苦了。

lxqxsyu commented 4 years ago

先容我赞一个再看

removeif commented 4 years ago

先容我赞一个再看

@lxqxsyu 哈哈,前端不太懂,代码写的烂,献丑了😂

vincewenminli commented 4 years ago

请问文章置顶怎么弄的呀,什么插件

removeif commented 4 years ago

请问文章置顶怎么弄的呀,什么插件

@vincewenminli 百度一下应该有插件,或者这篇文章中配置的第6点,以及配合之前博客源码中更新的那个ejs文件中相应代码加上就可以了

removeif commented 4 years ago

文章列表,加上评论数显示,测试一下。

Jamnine commented 4 years ago

直接获取源码生成,启动失败

removeif commented 4 years ago

直接获取源码生成,启动失败

@Ninth-MrJ 你在检查下呢,我也下载下来执行过没问题哦😂,配置部分第七点 安装依赖包执行了吗?

removeif commented 4 years ago

@Ninth-MrJ 刚刚又执行了一下,执行如下

git clone https://github.com/removeif/hexo-theme-icarus-removeif.git
npm install hexo --save     // 执行后有警告提示,不用管
hexo clean  // 文章中这个写成clear了更正一下,但是不影响后面
hexo g
hexo s

访问结果如下:

Jamnine commented 4 years ago

@removeif

直接获取源码生成,启动失败

@Ninth-MrJ 你在检查下呢,我也下载下来执行过没问题哦😂,配置部分第七点 安装依赖包执行了吗?

哦哦,可以了的,我刚刚找到了,是因为你的源码是带hexo的源码,不是单纯主题的源码,我没看仔细

Jamnine commented 4 years ago

@removeif @Ninth-MrJ 刚刚又执行了一下,执行如下

git clone https://github.com/removeif/hexo-theme-icarus-removeif.git
npm install hexo --save     // 执行后有警告提示,不用管
hexo clean  // 文章中这个写成clear了更正一下,但是不影响后面
hexo g
hexo s

访问结果如下:

@removeif 你那个阅读更多是在文章写了more? 还是主题配置了

removeif commented 4 years ago

@removeif 你那个阅读更多是在文章写了more? 还是主题配置了

@Ninth-MrJ 嗯 在文章里写的,文章模板加了,你new 文章的时候,直接移动下more的位置到自己想要的位置就好了,这样灵活一些。

Jamnine commented 4 years ago

@removeif

@removeif 你那个阅读更多是在文章写了more? 还是主题配置了

@Ninth-MrJ 嗯 在文章里写的,文章模板加了,你new 文章的时候,直接移动下more的位置到自己想要的位置就好了,这样灵活一些。

@removeif 我没用你的hexo的源码,我只用了你的主题,怎么我设置了我那里还是显示你的评论?

removeif commented 4 years ago

@removeif 我没用你的hexo的源码,我只用了你的主题,怎么我设置了我那里还是显示你的评论?

@Ninth-MrJ 部分配置的第一条,里面有说,改成你的对应参数

Jamnine commented 4 years ago

@removeif

@removeif 我没用你的hexo的源码,我只用了你的主题,怎么我设置了我那里还是显示你的评论?

@Ninth-MrJ 部分配置的第一条,里面有说,改成你的对应参数

@removeif 方便联系下我邮箱吗 ninthmrj@vip.qq.com  

removeif commented 4 years ago

主题版本更新至官方最新版v2.6.0

removeif commented 4 years ago

改版热门推荐,优化部分加载速度。

removeif commented 4 years ago

精简、更改配色。

jerryc127 commented 4 years ago

gitalk的評論數你是怎麽獲取的?

removeif commented 4 years ago

gitalk的評論數你是怎麽獲取的?

@jerryc127 目前的做法是拿到文章的issue id,然后根据GitHub Api可以拿到issue的内容,里面就有评论数了

jerryc127 commented 4 years ago

gitalk的評論數你是怎麽獲取的?

@jerryc127 目前的做法是拿到文章的issue id,然后根据GitHub Api可以拿到issue的内容,里面就有评论数了

感謝回答。。 查看了gitalk的源碼。 原來作者有提供方法拿到評論數 image

removeif commented 4 years ago

@jerryc127

gitalk的評論數你是怎麽獲取的?

@jerryc127 目前的做法是拿到文章的issue id,然后根据GitHub Api可以拿到issue的内容,里面就有评论数了

感謝回答。。 查看了gitalk的源碼。 原來作者有提供方法拿到評論數 image 那还挺方便,我还绕了个弯去拿😂

flymysql commented 4 years ago

主题很不错哈,你的站点有用cdn加速吗,感觉用这么多插件和模块,加载速度还挺快的

removeif commented 4 years ago

主题很不错哈,你的站点有用cdn加速吗,感觉用这么多插件和模块,加载速度还挺快的

@flymysql 嗯,网站部署在github上的,静态资源js/图片那些用了免费的cdn,jsdelivr https://www.jsdelivr.com

zexian-liucn commented 4 years ago

请问 怎样 修改各个栏位的宽度,感觉左右边的栏位 有点宽

removeif commented 4 years ago

请问 怎样 修改各个栏位的宽度,感觉左右边的栏位 有点宽

@zexian-liucn 第一个是控制左右两边的百分比https://github.com/removeif/hexo-theme-icarus-removeif/blob/master/themes/icarus/source/css/style.styl#L30

nineya commented 4 years ago

我是菜鸡,对Markdown语法了解不多,博主我想问一下,代码块是怎么做到在收起代码按钮右侧显示代码块名称的啊。谢谢

removeif commented 4 years ago

我是菜鸡,对Markdown语法了解不多,博主我想问一下,代码块是怎么做到在收起代码按钮右侧显示代码块名称的啊。谢谢

@nineya 直接加在类型后面,例如

import ...
nineya commented 4 years ago

@removeif 明白了,感谢你

flymysql commented 4 years ago

静态博客能用插件还是方便

removeif commented 4 years ago

静态博客能用插件还是方便

@flymysql 嗯嗯,其实虽是静态博客,但是还是难免有些动态数据,这时候就指望插件了😊

imaegoo commented 4 years ago

Icarus 3.0 代码重写了。。。打算升级嘛😭

removeif commented 4 years ago

@imaegoo Icarus 3.0 代码重写了。。。打算升级嘛😭

哈哈,还是要的,我准备空了就升级😊

removeif commented 4 years ago

Icarus 3.0 代码更新完成,本文档已更新。

Wittoy commented 4 years ago

你好,自定义css和js用cdn是改什么配置文件

removeif commented 4 years ago

@Wittoy 你好,自定义css和js用cdn是改什么配置文件

现在还不支持,回头有时间了做一下,目前非自定义的css,js部分cdn原作者已经做了配置,开启主题配置中以下即可

providers:
    # Name or URL template of the JavaScript and/or stylesheet CDN provider
    cdn: jsdelivr
    # Name or URL template of the webfont CDN provider
    fontcdn: google
    # Name or URL of the fontawesome icon font CDN provider
    iconcdn: fontawesome
Wittoy commented 4 years ago

@Wittoy 你好,自定义css和js用cdn是改什么配置文件

现在还不支持,回头有时间了做一下,目前非自定义的css,js部分cdn原作者已经做了配置,开启主题配置中以下即可

providers:
    # Name or URL template of the JavaScript and/or stylesheet CDN provider
    cdn: jsdelivr
    # Name or URL template of the webfont CDN provider
    fontcdn: google
    # Name or URL of the fontawesome icon font CDN provider
    iconcdn: fontawesome

自己折腾成功了🤣

yutouwd commented 4 years ago

博主你好呀,想问下归档页面的日历图是怎么实现的呀,之前试过百度的EChart,大部分图标都能用,就日历图用不了😂

removeif commented 4 years ago

@yutouwd 博主你好呀,想问下归档页面的日历图是怎么实现的呀,之前试过百度的EChart,大部分图标都能用,就日历图用不了😂

就是echart实现的,这里是源码文件,你参考下应该就会了

yutouwd commented 4 years ago

@removeif

@yutouwd 博主你好呀,想问下归档页面的日历图是怎么实现的呀,之前试过百度的EChart,大部分图标都能用,就日历图用不了😂

就是echart实现的,这里是源码文件,你参考下应该就会了

谢谢,我再研究下😅

TosakaUCW commented 4 years ago

请问侧边栏通过邮箱订阅,feedburner该如何使用

TosakaUCW commented 4 years ago

请问侧边栏通过邮箱订阅,feedburner该如何使用

问题已解决

therehello commented 4 years ago

博主您好!不知为何我的友链页面生成不了,没有任何显示,这是我的友链页面。希望可以得到博主帮助谢谢!

removeif commented 4 years ago

这是我的友链页面

你的页面中友链json数据都没有呢,参考文中的说明! 然后把主题配置_config.yml中 my_cdn_pre: #值注释掉,这个是调用我的cdn文件

therehello commented 4 years ago

cdn 已经注释掉了,json数据确实填写了,

[
  {
    "date": "2020.03.20",
    "src": "https://s2.ax1x.com/2020/02/28/3DsKzV.md.png",
    "name": "There,hello",
    "desc": "...",
    "url": "https://www.therehello.top"
  }
]

页面依然没有显示。不懂js,也许是我理解错了,谢谢!

removeif commented 4 years ago

cdn 已经注释掉了,json数据确实填写了,

[
  {
    "date": "2020.03.20",
    "src": "https://s2.ax1x.com/2020/02/28/3DsKzV.md.png",
    "name": "There,hello",
    "desc": "...",
    "url": "https://www.therehello.top"
  }
]

页面依然没有显示。不懂js,也许是我理解错了,谢谢!

这个文件中要引入 friend.js,你引入了吗?主题源码readme.md中有说明

therehello commented 4 years ago

@removeif

cdn 已经注释掉了,json数据确实填写了,

[
  {
    "date": "2020.03.20",
    "src": "https://s2.ax1x.com/2020/02/28/3DsKzV.md.png",
    "name": "There,hello",
    "desc": "...",
    "url": "https://www.therehello.top"
  }
]

页面依然没有显示。不懂js,也许是我理解错了,谢谢!

这个文件中要引入 friend.js,你引入了吗?主题源码readme.md中有说明

已解决,谢谢博主😊

ojhdt commented 4 years ago

请问一下Pjax的重载函数应该怎么写?

removeif commented 4 years ago

请问一下Pjax的重载函数应该怎么写?

源码已经开源了,可以自己去找找需要的代码,这里是主要的pjax的逻辑

ojhdt commented 4 years ago

@removeif

请问一下Pjax的重载函数应该怎么写?

源码已经开源了,可以自己去找找需要的代码,这里是主要的pjax的逻辑

似乎这里的函数中只有不蒜子的是给出的,其他都不在这里定义

        // PJAX 完成之后执行的函数,可以和上面的重载放在一起
        document.addEventListener('pjax:complete', function () {
            $(".section").css({opacity:1});
            loadIssueData();
            loadMathJax();
            loadMainJs(jQuery, window.moment, window.ClipboardJS, window.IcarusThemeSettings);
            loadGallery();
            loadBackTop();
            // loadSelfGitalk();
            loadBusuanzi();
            try{
                loadEchart();
            }catch (e) {
                console.log("no echart");
            }
        });`;

已知失效的js都在/source/js中,但无法通过重载js解决 作为示例,我查看了贵站的gallery.js,发现添加了有关loadGallery的代码

document.addEventListener('DOMContentLoaded', loadGallery());
function loadGallery() {
    if (typeof ($.fn.lightGallery) === 'function') {
        $('.article').lightGallery({ selector: '.gallery-item' });
    }
    if (typeof ($.fn.justifiedGallery) === 'function') {
        if ($('.justified-gallery > p > .gallery-item').length) {
            $('.justified-gallery > p > .gallery-item').unwrap();
        }
        $('.justified-gallery').justifiedGallery({rowHeight:230, margins:4});
    }
}

请问除去该处修改外还需作其他修改吗?

removeif commented 4 years ago

@ojhdt

@removeif

请问一下Pjax的重载函数应该怎么写?

源码已经开源了,可以自己去找找需要的代码,这里是主要的pjax的逻辑

似乎这里的函数中只有不蒜子的是给出的,其他都不在这里定义

        // PJAX 完成之后执行的函数,可以和上面的重载放在一起
        document.addEventListener('pjax:complete', function () {
            $(".section").css({opacity:1});
            loadIssueData();
            loadMathJax();
            loadMainJs(jQuery, window.moment, window.ClipboardJS, window.IcarusThemeSettings);
            loadGallery();
            loadBackTop();
            // loadSelfGitalk();
            loadBusuanzi();
            try{
                loadEchart();
            }catch (e) {
                console.log("no echart");
            }
        });`;

已知失效的js都在/source/js中,但无法通过重载js解决 作为示例,我查看了贵站的gallery.js,发现添加了有关loadGallery的代码

document.addEventListener('DOMContentLoaded', loadGallery());
function loadGallery() {
    if (typeof ($.fn.lightGallery) === 'function') {
        $('.article').lightGallery({ selector: '.gallery-item' });
    }
    if (typeof ($.fn.justifiedGallery) === 'function') {
        if ($('.justified-gallery > p > .gallery-item').length) {
            $('.justified-gallery > p > .gallery-item').unwrap();
        }
        $('.justified-gallery').justifiedGallery({rowHeight:230, margins:4});
    }
}

请问除去该处修改外还需作其他修改吗?

应该没有其他了,你试试呢