{"id":13431834,"url":"https://github.com/removeif/hexo-theme-icarus-removeif","last_synced_at":"2026-02-22T08:16:11.149Z","repository":{"id":42321863,"uuid":"209574442","full_name":"removeif/hexo-theme-icarus-removeif","owner":"removeif","description":"Blog：https://removeif.github.io source code, modify from hexo-theme-icarus, simple and practical. Archieved !","archived":false,"fork":false,"pushed_at":"2023-01-05T05:18:21.000Z","size":4765,"stargazers_count":65,"open_issues_count":22,"forks_count":38,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-20T09:21:50.162Z","etag":null,"topics":["hexo","hexo-blog","hexo-theme","icarus"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/removeif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-19T14:25:50.000Z","updated_at":"2023-07-22T06:17:43.000Z","dependencies_parsed_at":"2023-02-03T12:47:01.747Z","dependency_job_id":null,"html_url":"https://github.com/removeif/hexo-theme-icarus-removeif","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-icarus-removeif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-icarus-removeif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-icarus-removeif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-icarus-removeif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/removeif","download_url":"https://codeload.github.com/removeif/hexo-theme-icarus-removeif/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221668938,"owners_count":16860763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hexo","hexo-blog","hexo-theme","icarus"],"created_at":"2024-07-31T02:01:06.328Z","updated_at":"2026-02-22T08:16:11.073Z","avatar_url":"https://github.com/removeif.png","language":"JavaScript","funding_links":[],"categories":["Content"],"sub_categories":[],"readme":"**此仓库不在单独维护，请移步至纯主题仓库[hexo-theme-amazing](https://github.com/removeif/hexo-theme-amazing)**\n\n\u003cbr/\u003e\n\n**预览图**\n+ 首页1\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200208141757.png)\n+ 首页2\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200208142200.png)\n+ 博客文章\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200208142111.png)\n+ 首页深色\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200208142013.png)\n\n### 写在前面\n\n博客源码包括两个主题[icarus](http://github.com/ppoffice/hexo-theme-icarus)和[next](https://github.com/iissnan/hexo-theme-next)，在主题基础之上参照各网友博客，以及自己的一些想法做出的一些修改以及增加部分新元素。  \n因为修改了原作者源码，有什么问题请先联系我，不要去麻烦原作者了，能自己解决的问题就不要麻烦别人了，每个人的时间都很宝贵。  \n膜拜和感谢所有模块的原作者,orz👻,辛苦了。  \n\n**本仓库为博客主题完整仓库，纯主题仓库请移步为[hexo-theme-amazing](https://github.com/removeif/hexo-theme-amazing)**\n\n\n线上博客：[欢迎围观](https://removeif.github.io/)，[博客源码Live Demo](https://removeif.github.io/removeif-demo/)\n\n### 一、icarus主题之上主要改动\n+ 新增gitalk最新评论widget\n+ 首页增加热门推荐\n+ 增加弹性配置影音（可加音乐、视频）模块\n+ 丰富弹性配置about页面\n+ 新增弹性配置友链模块\n+ 整体布局左右拉伸了一点，紧凑一些\n+ 文章页双栏模式、固定导航栏\n+ 引入可配置看板娘\n+ 归档页加入了一个文章贡献概览\n+ 置顶文章的设置\n+ 文章列表评论数显示\n+ 文章中推荐文章模块配置 \n+ 增加深色主题切换\n+ 加入加密文章\n+ 碎碎念功能\n+ 透明无界样式\n+ 简化部分widget数据，加入`查看全部`按钮\n+ gitalk评论增加评论开关，评论列表中标记博主\n+ 还有什么新的，好的feature欢迎大家随时提出来，有能力有时间就做出来\n\n### 二、部分配置说明：\n\n#### 本机环境：\n```jshelllanguage\n192:hexo-theme-icarus-removeif xx$ node -v\nv11.1.0\n192:hexo-theme-icarus-removeif xx$ npm -v\n6.4.1\n```  \n注意文章模板文件中的配置 /scaffolds/post.md\n```text\n---\nthumbnail:\ntitle: {{ title }}\ndate: {{ date }}\ntags:\ncategories: \ntoc: true\nrecommend: 1\nkeywords: categories-java\nuniqueId: {{ date }}/{{ title }}.html\n---\n```\n`uniqueId` 文章唯一标识，用于评论issue的id\n#### 克隆博客代码到本地\n```jshelllanguage\ngit clone https://github.com/removeif/hexo-theme-icarus-removeif.git\n```\n#### 开始部分配置：\n**敲黑板！！！！首先全局以及主题中的`_config.yml`配置成自己的对应参数。**\n#### 1.热门推荐，最新评论：\n**仅针对gitalk评论有效，如果配置完后显示[本博客](https://removeif.github.io/)相关评论、推荐，请详细阅读这一条**  \n热门推荐，最新评论，文章评论数关联的js文件路径：themes/icarus/source/js/comment-issue-data.js  \n以下引号里的地址改成自己对应的博客评论的issues的仓库相关的值。repoIssuesUrl改两个值（removeif和blog_comment改成自己对应的）\n```yaml\n// 评论issues仓库 by.removeif https://removeif.github.io/\nvar repoIssuesUrl = \"https://api.github.com/repos/removeif/blog_comment/issues\"; // removeif：用户名，blog_comment：评论的issue仓库\n// 评论issues仓库 clientId、clientSecret怎么申请自行搜索，关于这暴露两个参数的安全问题，查看 https://removeif.github.io/2019/09/19/博客源码分享.html#1-热门推荐，最新评论：\nvar clientId = \"46a9f3481b46ea0129d8\";\nvar clientSecret = \"79c7c9cb847e141757d7864453bcbf89f0655b24\";\n```\ngithub api 详情可以参照[官方api说明](https://developer.github.com/v3/#rate-limiting)  \n关于配置暴露client_id和client_secret安全性问题，gitalk作者有[解释](https://github.com/gitalk/gitalk/issues/150)  \n对应主题中的`_config.yml`要开启如下配置，xxx换成自己的，否则无效。\n```yaml\ncomment:\n    type: gitalk\n    owner: xxx         # (required) GitHub user name\n    repo: xxx          # (required) GitHub repository name\n    client_id: xxx     # (required) OAuth application client id\n    client_secret: xxx # (required) OAuth application client secret\n    admin: xxx  #此账户一般为用户名 GitHub user name 文章中能创建issue需要此用户登录才可以，点了创建issue后刷新一遍才能看到！！！！\n    create_issue_manually: true\n    distraction_free_mode: true\n    has_hot_recommend: true # 是否有热门推荐\n    has_latest_comment: true #是否有最新评论\n```\n说明：\n+ `has_hot_recommend: true` 是否开启首页热评，false-不开启，true-开启\n+ `has_latest_comment: true` 是否开启最新评论，false-不开启，true-开启\n+ 热门推荐数据为评论数最多的文章，🔥后面的数字：根据文章的评论数*101 。  \n+ 最新评论：为该仓库下，所有issue中的最新评论。  \n+ 目前的最新评论有1分钟的本地缓存，评论后可能1分钟后才能看见最新评论，出于性能优化，每次请求接口处理还是挺耗时，comment-issue-data.js中可以自己去掉。  \n\n#### 2.友链数据文件：\n文件路径：themes/icarus/source/js/friend.js  \n相应格式增加自己需要的数据。\n友链数据中，\"valid\": 0 代表异常网站，\"valid\": 1或者不填此字段代表正常网站，可以自己配置；\"stopTime\": \"2019.09.09\"代表异常时访问的时间\n{\n\"date\": \"2019.09.09\",\n\"stopTime\": \"2019.09.09\",\n\"src\": \"https://cdn.jsdelivr.net/gh/removeif/removeif.github.io/images/tuzi.jpg\",\n\"name\": \"@辣椒の酱\",\n\"desc\": \"后端开发，技术分享。\",\n\"url\": \"https://removeif.github.io/\",\n\"valid\": 0\n}\n\n#### 3.影音数据文件：\n文件路径： \n音乐：themes/icarus/source/json_data/music.json  \n视频：themes/icarus/source/json_data/video.json    \n相应格式增加自己需要的数据。    \n        \n#### 4.关于页面时间轴记录数据文件：\n文件路径：themes/icarus/source/json_data/record.json   \n相应格式增加自己需要的数据。\n\n#### 5.看板娘配置\n主题中的`_config.yml`配置如下设置\n```text\nlive2Dswitch: off #live2D开关 on为打开,off为关闭\n```\n\n#### 6.置顶设置：\n.md文章头部数据中加入top值，top值越大越靠前，大于0显示置顶图标。\n修改依赖包中文件removeif/node_modules/hexo-generator-index/lib/generator.js如下：\n```js \n'use strict';\nconst pagination = require('hexo-pagination');\nmodule.exports = function(locals){\n    var config = this.config;\n    var posts = locals.posts;\n    posts.data = posts.data.sort(function(a, b) {\n        if(a.top == undefined){\n            a.top = 0;\n        }\n        if(b.top == undefined){\n            b.top = 0;\n        }\n        if(a.top == b.top){\n            return b.date - a.date;\n        }else{\n           return b.top - a.top;\n        }\n    });\n    var paginationDir = config.pagination_dir || 'page';\n    return pagination('', posts, {\n        perPage: config.index_generator.per_page,\n        layout: ['index', 'archive'],\n        format: paginationDir + '/%d/',\n        data: {\n            __index: true\n        }\n    });\n};\n```\n#### 7.配置文章中推荐文章模块  \n根据配置的recommend值（必须大于0），值越大越靠前，相等取最新的，最多取5条。recommend（6.中top值也在下面示例）配置在.md文章头中，如下  \n```yaml\ntitle: 博客源码分享\ntop: 1\ntoc: true\nrecommend: 1 \nkeywords: categories-github\ndate: 2019-09-19 22:10:43\nthumbnail: https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20190919221611.png\ntags: 工具教程\ncategories: [工具教程,主题工具]\n```\n#### 8.文章中某个代码块折叠的方法\n代码块头部加入标记 `\u003efolded`，如下代码块中使用。\n```java main.java \u003efolded\n    // 使用示例，.md 文件中头行标记\"\u003efolded\"\n    // ```java main.java \u003efolded\n    // import main.java\n    // private static void main(){\n    //     // test\n    //     int i = 0;\n    //     return i;\n    // }\n    // \\\\``` \n```\n#### 9.加入加密文章\n如下需要加密的文章头部加入以下代码\n```text\n---\ntitle: 2019成长记01\ntop: -1\ntoc: true\nkeywords: categories-java\n\n#以下为文章加密信息\nencrypt: true\npassword: 123456 #此处为文章密码\nabstract: 咦，这是一篇加密文章，好像需要输入密码才能查看呢！\nmessage: 嗨，请准确无误地输入密码查看哟！\nwrong_pass_message: 不好意思，密码没对哦，在检查检查呢！\nwrong_hash_message: 不好意思，信息无法验证！\n---\n```\n注：**加密文章不会出现在最新文章列表widget中，也不会出现在文章中推荐列表中，首页列表中需要设置top: -1 让它排在最后比较合理一些。**\n#### 10.碎碎念的使用\n在github中，创建碎碎念issue，并且打上对应的label（`eg:666666`）对应配置中为id，填写到source/self-talking/index.md文件中如下对应位置，其余配置也要改成自己的，如clientID等。\n```js\n\u003cscript\u003e\n    var gitalk = new Gitalk({\n        clientID: '46a9f3481b46ea0129d8',\n        clientSecret: '79c7c9cb847e141757d7864453bcbf89f0655b24',\n        id: '666666',\n        repo: 'issue_database',\n        owner: 'removeif',\n        admin: \"removeif\",\n        createIssueManually: true,\n        distractionFreeMode: false\n    })\n    gitalk.render('comment-container1')\n\u003c/script\u003e\n```\n如下：\n![碎碎念](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200119181607.png)\n#### 11.本博客样式（透明无界）\n只需要放开themes/icarus/source/css/base.styl文件中以下样式代码注释即可，默认是注释的没启用\n```css \n//=================本博客使用样式   start\n\n// 首页去图\n.body_hot_comment .comment-content .card-comment-item .ava, .media-left, .is-6-widescreen .card-image {\n    display: none;\n}\n\nhover-color = #deeafb;\n// 去card\n.card {\n    background-color: unset;\n    box-shadow: unset;\n}\n\n.navbar, footer.footer {\n    background-color: unset;\n}\n\nbody:not(.night) .navbar:hover,\nbody:not(.night) .footer:hover,\nbody:not(.night) .card:hover,\nbody:not(.night) .pagination:hover,\nbody:not(.night) .post-navigation:hover{\n    background-color: hover-color;\n    box-shadow: 0 4px 10px rgba(0,0,0,0.05),0 0 1px rgba(0,0,0,0.1);\n}\n\n.pagination, .post-navigation{\n    padding: 10px;\n}\n\n.pagination .pagination-link:not(.is-current), .pagination .pagination-previous, .pagination .pagination-next {\n    background-color:rgba(255,255,255,0);\n}\n\n.timeline .media:last-child:after {\n    background: unset;\n}\n.content .gt-container .gt-comment-admin .gt-comment-content {\n    border: 2px solid #deeafb;\n}\n\n//=================本博客使用样式   end\n```\n如下：\n![无界样式](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200218084713.png)\n#### 精简部分widget数据\nwidget中的归档和分类和标签精简了，数据多时很丑，改为了分别展示5条和10条和20条，增加了查看全部。\n![查看全部](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200119181201.png)\n\n#### gitalk评论增加评论开关，评论列表中标记博主\n需要关闭评论的在文章头部加入 `comments: false`,原来已经评论的依然会显示，如下\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200211151129.png)\n\n原来已有博客文章的迁移，只需要把原来对应的文章放到source/_posts里即可。然后去对应文章下面创建评论issue。  \n\n#### 左下角网站运行时间更改\n文件是：hexo-theme-icarus-removeif/themes/icarus/source/js/statistics.js，对应如下，修改成自己网站开始运行的时间就行\n```js\n    var n = new Date(\"11/11/2018 00:00:00\");\n```\n\n#### 以上配置好后\n```yaml\n$ npm install #安装依赖包（只需要执行一次）\n$ hexo clean #清除缓存\n$ hexo g #编译 \n$ hexo s #启动服务 \n$ hexo d #推到远程 \n```\n安装依赖包（只需要执行一次），以后修改了代码 只需要执行后面几条就好。  \n\nok,enjoy it！👏👏👏\n\n### 写在后面\n如果你有问题请反馈: [issues](https://github.com/removeif/hexo-theme-icarus-removeif/issues) （请务必先于issues中寻找答案）  \n如果你喜欢该主题: [star](https://github.com/removeif/hexo-theme-icarus-removeif)  \n如果你想定制主题: [fork](https://github.com/removeif/hexo-theme-icarus-removeif) \n### License\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/removeif/hexo-theme-icarus-removeif/blob/master/LICENSE) file for details.\n\n### 其余主题彩蛋\n**文章中横竖图demo；对于横竖图推荐分开使用，且长宽一致的，如统一手机拍照、电脑截图**\n使用方法：md文章中放入以下代码\n```html\n\n+ 横竖图\n\n\u003cdiv class=\"justified-gallery\"\u003e\n\n![张芷溪](http://wx1.sinaimg.cn/large/b5d1b710ly1g6bz7n92s7j212w0nr1kx.jpg) ![李一桐](http://wx2.sinaimg.cn/mw1024/005RAHfgly1fvfc4f19qfj33402c0qv9.jpg) ![gakki](http://wx1.sinaimg.cn/mw1024/70396e5agy1g5qe457i6yj21660ogtap.jpg) ![李一桐](http://wx1.sinaimg.cn/mw1024/005RAHfgly1fuzz17s2q3j32e43cku0x.jpg) ![彭小苒](http://wx1.sinaimg.cn/mw1024/d79c9b94ly1g1pb1uthr5j21f02iox6t.jpg)\u003c/div\u003e\n\n+ 横图4\n\n\u003cdiv class=\"img-x\"\u003e\n\n![v4](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191022182226.png) ![v3](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191018114126.png) ![v4](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191022182226.png) ![v3](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191018114126.png)\u003c/div\u003e\n\n+ 竖图5\n\n\u003cdiv class=\"img-y\"\u003e\n\n![电池](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191024145940.jpg) ![打王者荣耀](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191024141906.jpg) ![支付宝付款](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191024141926.jpg) ![锤子便签](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191024145956.jpg) ![电池](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191024145940.jpg)\u003c/div\u003e\n\n```\n#### 效果如下（多图左右拉查看）\n[查看效果](https://removeif.github.io/theme/%E5%8D%9A%E5%AE%A2%E6%BA%90%E7%A0%81%E5%88%86%E4%BA%AB.html#效果如下（多图左右拉查看）)\n\n### 主题快照：\n+ 主页\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200208141757.png)\n+ 置顶\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20190926210437.png)\n+ 文章评论数\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191016133335.png)\n+ 推荐文章模块\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20191107131513.png)\n+ 归档\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200214190807.png)\n+ 留言\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20190919221820.png)\n+ 友链\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20190919221917.png)\n+ 美图\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20190919221949.png)\n+ 影音\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20190919222030.png)\n+ 关于\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2019/20190919222131.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremoveif%2Fhexo-theme-icarus-removeif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremoveif%2Fhexo-theme-icarus-removeif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremoveif%2Fhexo-theme-icarus-removeif/lists"}