{"id":13430897,"url":"https://github.com/ZEROKISEKI/hexo-theme-gal","last_synced_at":"2025-03-16T06:31:36.014Z","repository":{"id":42234178,"uuid":"108730794","full_name":"ZEROKISEKI/hexo-theme-gal","owner":"ZEROKISEKI","description":"忧郁的弟弟网站主题移植","archived":false,"fork":false,"pushed_at":"2021-05-27T19:56:27.000Z","size":5256,"stargazers_count":392,"open_issues_count":23,"forks_count":92,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-05-20T09:18:10.475Z","etag":null,"topics":["hexo","hexo-theme"],"latest_commit_sha":null,"homepage":null,"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/ZEROKISEKI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-29T12:05:32.000Z","updated_at":"2024-05-11T12:56:28.000Z","dependencies_parsed_at":"2022-09-07T13:40:47.448Z","dependency_job_id":null,"html_url":"https://github.com/ZEROKISEKI/hexo-theme-gal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZEROKISEKI%2Fhexo-theme-gal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZEROKISEKI%2Fhexo-theme-gal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZEROKISEKI%2Fhexo-theme-gal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZEROKISEKI%2Fhexo-theme-gal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZEROKISEKI","download_url":"https://codeload.github.com/ZEROKISEKI/hexo-theme-gal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221656469,"owners_count":16858777,"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-theme"],"created_at":"2024-07-31T02:00:58.811Z","updated_at":"2024-10-27T09:31:05.271Z","avatar_url":"https://github.com/ZEROKISEKI.png","language":"JavaScript","funding_links":[],"categories":["Content"],"sub_categories":[],"readme":"# hexo-theme-gal\n\n# 前言\n\n当我刚刚成为一名gal的萌新时, 忧郁的弟弟已经结婚了(恭喜弟弟君)\n\n弟弟站点的主题感觉挺好看的, 不过是wordpress的主题, 在弟弟的站点也看出很多人喜欢这个站点, 甚至有挺多人在问如何做出这种站点\n\n正好我注册了个新的blog域名, 要重新弄个hexo博客(太久没写过博文了), 而又不想用其他主题, 又听贴吧说弟弟站点好像要关了\n\n于是乎就有了这次的hexo移植版, 还原度不说100%(也不可能), 也有90%了(毕竟hexo跟wordpress是两个不同的东西)\n\n下面的**配置说明**一定要先做好, 因为包含了主题的依赖(反正很重要就是了)\n\n主题示例博客:[myau.moe](https://myau.moe)\n    \n# 更新: 2018/3/4\n\n有个小小的建议, 这个主体可能需要配置比较多的图片, 图片比如好几百kb甚至上m的加载会慢, 这点可以用一些网站进行图片压缩, 然后把图片放在一些对象存储空间上(比如七牛的对象存储空间),\n比如我的博客[myau.moe](https://myau.moe)就是这样的, 所以加载会快些, 关于图片压缩, 可以用下面几个网站:\n\n### [TinyPng](https://tinypng.com/)\n### [CloudConvert](https://cloudconvert.com/)\n\n另外, 给大家推荐一个网站, 我个人觉得挺好用的, 有很多功能\n\n### [创造师](http://chuangzaoshi.com/)     \n\n# 更新: 2018/3/30\n\n参照gitment项目的这个[issue](https://github.com/imsun/gitment/issues/118)将gitment的id定为了文章的具体时间(主要是因为github issue label有长度限制, 如果文章标题采用了中文进行了url编码很容易超出限制导致初始化失败, 出现Validation Failed)\n\n# 配置说明\n\n    git clone https://github.com/ZEROKISEKI/hexo-theme-gal.git themes/gal\n    \n    or \n    \n    git clone https://github.com/ZEROKISEKI/hexo-theme-gal.git themes/gal --depth 1\n\n## 使用该主题前要安装的东西:\n\n    更改主题为: gal\n\n    在你的hexo站点目录(非主题目录)下安装 hexo-renderer-sass 和 hexo-renderer-scss\n    \n    npm install hexo-renderer-sass --save \n    \n    npm install hexo-renderer-scss --save\n    \n    or \n    \n    cnpm install hexo-renderer-sass --save\n    \n    cnpm install hexo-renderer-scss --save\n    \n    or \n    \n    yarn add hexo-renderer-sass(推荐)\n    \n    yarn add hexo-renderer-scss(推荐)\n    \n    \n    上面的一步是将.scss样式文件渲染成最后的style.css文件\n    \n    然后, 在你的hexo站点目录下安装 hexo-generator-json-content\n    \n    npm install hexo-generator-json-content --save\n    \n    or \n    \n    cnpm install hexo-generator-json-content --save\n    \n    如果后面你hexo g的时候有问题, 注意看看是不是这个json-content的问题, 如果是的话就是你的node比较老\n    \n    接着在hexo站点目录的_config.yml下进行配置:\n    \n    jsonContent:\n      dateFormat: MM-DD\n      pages:\n        title: true\n        text: true\n        path: true\n        date: true\n        excerpt: true\n        preview: true\n      posts:\n        title: true\n        text: true\n        path: true\n        date: true\n        excerpt: true\n        tags: [{\n          name: tag.name,\n          slug: tag.slug,\n          permalink: tag.permalink\n        }]\n        preview: true\n    \n    接着, 进行下面的步骤:\n    \n    hexo new page \"search\"              // 搜索功能的必须步骤\n    hexo new page \"404\"                 // 开启404页面\n    \n    至于tags和categories页面的设置, 百度或google就有对应的方法了, 这里就不多说了\n    \n    对了, hexo站点目录的_config.yml的title, description, author和url要自己正确配置\n    \n## 主题的配置说明:\n\n主题配置说明在[wiki](https://github.com/ZEROKISEKI/hexo-theme-gal/wiki/%E4%B8%BB%E9%A2%98%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E)\n\n更新：新开了一个issue，主题的一些新的配置说明将会写在这个issue上。 [issue #46](https://github.com/ZEROKISEKI/hexo-theme-gal/issues/46)\n\n## 使用建议:\n\n    1. 建议每一篇文章都要在front-matter设置preview图片地址, 这个地址是url地址(本地的也要写完整的url)\n    2. 每一篇文章的excerpt部分(即\u003c!--more--\u003e之前的部分)是纯文本而不要是markdown\n    3. 作为背景用的图片大小都应该差不多, 比如示例用的几张背景图片都是1920 * 1080那样的\n    4. 使用gitment作为评论系统, 在新发布文章时要去对应文章页面下点击初始化评论系统按钮(需登录)\n    5. 可以设置置顶文章, 需要在front-matter设置top: true, 设置置顶文章最好只设置一篇\n\n# 吐槽 \u0026\u0026 痛点:\n\nhexo只能采用第三方的评论系统, 要达到还原主题的评论效果, 目前只有gitment符合要求, 但是github issue没有那种一层一层回复的效果, 所以回复评论上只能采用**@**的方式\n\n挺多hexo主题的搜索功能是直接链接到搜索引擎的site或者出现搜索框ajax出现搜索内容, 主题的搜索功能为了尽可能达到完全一致, 采用的方法并不是很妥当(用了带url参数的方式), 不过静态博客系统应该问题不大(也没什么东西可以被打):grin:\n\n原主题采用了shortcode(短代码), 比如说`[warning]blablabla[/waring]`是对应解析成警告框的, 这点在hexo上可以实现, 但是这样就要求hexo用户也知道对应的规则, 不是很好, 所以在文章的markdown解析样式上是参照了其他一些主题的样式, 这点我无法做到完全的还原:disappointed:, 如果有人可以的话, 也可以做一下这个功能, 不过要对zanblog的解析规则了解才好\n\n侧边栏标签云那里的字体随机大小, wordpress 直接有个方法`change_tag_cloud_font_sizes()`, 直接设定最大最小就行了, 每次刷新页面都是固定的值, 我用hexo取随机值每次都会变大小, 这点以后再改好些吧\n\n反正近期有空的话就继续做\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZEROKISEKI%2Fhexo-theme-gal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZEROKISEKI%2Fhexo-theme-gal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZEROKISEKI%2Fhexo-theme-gal/lists"}