{"id":13431341,"url":"https://github.com/removeif/hexo-theme-amazing","last_synced_at":"2026-01-12T02:21:35.610Z","repository":{"id":36990214,"uuid":"245089486","full_name":"removeif/hexo-theme-amazing","owner":"removeif","description":"Demo: https://removeif.github.io/removeif-demo hexo-theme","archived":false,"fork":false,"pushed_at":"2025-01-14T02:50:39.000Z","size":3120,"stargazers_count":316,"open_issues_count":11,"forks_count":84,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-12-28T16:44:20.199Z","etag":null,"topics":["adsense","blog","gitalk","hexo","hexo-theme","icarus","latest-comment","valine"],"latest_commit_sha":null,"homepage":"https://removeif.github.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/removeif.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-05T06:47:44.000Z","updated_at":"2025-11-19T07:50:37.000Z","dependencies_parsed_at":"2024-01-18T14:41:34.181Z","dependency_job_id":"c80c67ea-b8e7-46ee-9efa-77a06b316cf8","html_url":"https://github.com/removeif/hexo-theme-amazing","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/removeif/hexo-theme-amazing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-amazing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-amazing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-amazing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-amazing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/removeif","download_url":"https://codeload.github.com/removeif/hexo-theme-amazing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/removeif%2Fhexo-theme-amazing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28332023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["adsense","blog","gitalk","hexo","hexo-theme","icarus","latest-comment","valine"],"created_at":"2024-07-31T02:01:02.364Z","updated_at":"2026-01-12T02:21:35.595Z","avatar_url":"https://github.com/removeif.png","language":"JavaScript","funding_links":[],"categories":["Content"],"sub_categories":[],"readme":"\u003cp align=\"center\" class=\"mb-2\"\u003e\nAMAZING\n\u003cbr\u003e A simple, delicate, and modern theme for the static site generator Hexo.\n\u003cbr\u003e\n\u003ca href=\"https://removeif.github.io/\"\u003ePreview\u003c/a\u003e |\n\u003ca href=\"https://github.com/removeif/hexo-theme-amazing/discussions\"\u003eDiscuss on GitHub\u003c/a\u003e\n\u003cbr\u003e\n\u003c/p\u003e\n\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200923152909.png)\n\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200923153450.png)\n\n### 写在前面\n\n博客源码在主题[icarus](http://github.com/ppoffice/hexo-theme-icarus)基础之上参照各网友博客，以及自己的一些想法做出的一些修改以及增加部分新元素。除了以下配置，其余配置请到[icarus官网查看](http://github.com/ppoffice/hexo-theme-icarus)。\n因为修改了原作者源码，有什么问题请先联系我，不要去麻烦原作者了，能自己解决的问题就不要麻烦别人了，每个人的时间都很宝贵。  \n膜拜和感谢所有模块的原作者,orz👻,辛苦了。  \n**使用之前请详细阅读此文档，以及主题配置文件_config.yml**  \n**使用之前请详细阅读此文档，以及主题配置文件_config.yml**  \n**使用之前请详细阅读此文档，以及主题配置文件_config.yml**  \n**相关使用问题也在此[issue](https://github.com/removeif/hexo-theme-amazing/issues/16)有说明，请先查看**\n\n**本仓库为纯主题仓库，博客主题完整仓库(已不维护)请移步为[hexo-theme-icarus-removeif](https://github.com/removeif/hexo-theme-icarus-removeif)**  \n**master分支已在信息流中加入adsense广告配置**  \n**提供site分支博客demo源码**\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+ 加入pjax提升页面访问体验，配置文件中可开启关闭\n+ 侧边栏加入可配置网易云歌单音乐插件，配合pjax可以实现页面间切换背景音乐不间断\n+ 文章中加入相关文章模块，取分类相同的最新的5条文章\n+ 支持valine最新评论以及文章评论数显示\n+ utteranc评论随博客主题切换自动切换深色主题\n+ 首页增加可配置banner\n+ 有问题可以在线询问[gitter.im](https://gitter.im/hexo-theme-amazing/community)\n+ `还有什么新的，好的feature欢迎大家随时提出来，有能力有时间就做出来`\n\n### 二、部分配置说明：\n\n#### 安装方法\n博客下 直接clone\n```jshelllanguage\ngit clone https://github.com/removeif/hexo-theme-amazing.git themes/amazing\n```\n\n或者通过 npm 安装\n```jshelllanguage\nnpm i hexo-theme-amazing  \nhexo config theme amazing // 提示缺少依赖就按提示的安装相应依赖即可\n// 博客目录下增加 博客配置文件_config.yml，以及主题配置文件_config.amazing.yml进行配置即可 \n```\n#### 开始部分配置：\n**敲黑板！！！！首先全局以及主题中的`_config.yml`配置成自己的对应参数。**  \n\n把主题中ex_pages文件夹中的文件复制到博客主目录相应目录下面。包含了文章模板、关于页、相册页、友链、留言板、音乐、影音、碎碎念页面（各个页面的.md文件可自定义修改内容），可以自己选择性需要哪些页面复制哪些过去，同时对应配置主题中`_config.yml`需要删除以及保留相应的menu，如下配置\n```yaml\nnavbar:\n    # Naviagtion menu items\n    menu:\n        首页: /\n        归档: /archives\n        分类: /categories\n        标签: /tags\n        影音: /media\n        相册: /album\n        友链: /friend\n        碎碎念: /self-talking\n        留言: /message\n        关于: /about\n```\n#### 1.热门推荐，最新评论：\n**热门推荐仅支持gitalk，最新评论支持gitalk \u0026 valine**\n对应主题中的`_config.yml`要开启如下配置（此为gitalk，valine配置文件中也有示例），xxx换成自己的，否则无效。**对于gitalk部署博客后需要到相应文章评论处点击初始化issue评论，完成评论的初始化。**\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/amazing/source/js/friend.js  \n相应格式增加自己需要的数据。  \n友链数据中，\"valid\": 0 代表异常网站，\"valid\": 1或者不填此字段代表正常网站，可以自己配置；\"stopTime\": \"2019.09.09\"代表异常时访问的时间\n```text\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\n#### 3.影音数据文件：\n文件路径： \n音乐：themes/amazing/source/json_data/music.json  \n视频：themes/amazing/source/json_data/video.json    \n相应格式增加自己需要的数据。    \n        \n#### 4.关于页面时间轴记录数据文件：\n文件路径：themes/amazing/source/json_data/record.json   \n相应格式增加自己需要的数据。\n\n#### 5.看板娘配置\n主题中的`_config.yml`配置如下设置\n```text\nhas_live_2D_switch: true #live2D开关 true为打开,false为关闭\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\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:Gitalk,666666`）如下图，此处666666对应下面配置代码中的id，填写到：博客目录/source/self-talking/index.md文件中如下对应位置，其余配置也要改成自己的，如clientID等。\n![](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200310182707.png)\n```js\n\u003cscript\u003e\n    $.getScript(\"/js/gitalk_self.min.js\", function () {\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    });\n\u003c/script\u003e\n```\n如下：\n![碎碎念](https://cdn.jsdelivr.net/gh/removeif/blog_image/img/2020/20200119181607.png)\n#### 11.本博客样式（透明无界）\n只需要放开themes/amazing/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完整配置，请仔细阅读主题中**_config.yml**\n```yaml\nhas_hitokoto: true #左边一言开关，true-开，false-关 \nhas_latest_modify_time: true #是否显示最后修改时间 true开启，false-关闭   \nbusuanzi_only_count: false #当上面plugins中busuanzi: true时，此配置busuanzi_only_count为true时，网站不显示不蒜子统计数据，但是会每次统计。false时显示统计数据。\nhas_copyright: true # 文中是否显示copyright true开启，false-关闭   \n# http://sachinchoolur.github.io/lightGallery/docs/api.html \nlightgallery_is_full: true #图片灯箱是否显示完整的插件(包括放大，分享等)，true-显示，false-显示简洁版\nwebsite_start_time: 2018/11/11 00:00:00 #网站运行开始时间,不填不显示\nfooter_registered_no: 测试-川ICP备20001070号-1 #备案号\nfooter_copyright_dsec: true #footer 版权说明 true-开 false-关\nhas_live_2D_switch: true #live2D开关 true-开 false-关\nside_music_netease_id: 2364053447 #侧边栏网易云歌单id\nuse_pjax: false #是否开启pjax，false-不开启，true-开启，开启后局部更新网页信息，切换页面背景音乐不间断等特性\n```\n#### 以上配置好后\n```yaml\n$ npm install #安装依赖包（只需要执行一次）可直接把本文最后的json文件内容复制到博客下面的依赖文件package.json后在执行此命令，如果原来已有node_modules文件夹，请先删除在执行此命令\n$ hexo clean #清除缓存\n$ hexo g #编译 \n$ hexo s #启动服务 \n$ hexo d #推到远程 \n```\n安装依赖包（只需要执行一次），以后修改了代码 只需要执行后面几条就好。  \n\n### 写在后面\n如果你有问题请反馈: [issues](https://github.com/removeif/hexo-theme-amazing/issues) （请务必先于issues中寻找答案）  \n如果你喜欢该主题: [star](https://github.com/removeif/hexo-theme-amazing)  \n如果你想定制主题: [fork](https://github.com/removeif/hexo-theme-amazing) \n### License\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/removeif/hexo-theme-amazing/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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremoveif%2Fhexo-theme-amazing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremoveif%2Fhexo-theme-amazing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremoveif%2Fhexo-theme-amazing/lists"}