{"id":13431821,"url":"https://github.com/zchengsite/hexo-theme-oranges","last_synced_at":"2025-03-16T22:32:13.746Z","repository":{"id":39237056,"uuid":"202997720","full_name":"zchengsite/hexo-theme-oranges","owner":"zchengsite","description":"🍊A simple hexo theme of minimalism","archived":false,"fork":false,"pushed_at":"2024-04-03T06:58:13.000Z","size":1277,"stargazers_count":474,"open_issues_count":21,"forks_count":78,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-20T09:21:46.310Z","etag":null,"topics":["hexo","hexo-theme","minimalism","theme"],"latest_commit_sha":null,"homepage":"https://hexo.theme.oranges.zcheng.site/","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/zchengsite.png","metadata":{"files":{"readme":"README-zh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-18T12:02:44.000Z","updated_at":"2024-06-03T05:10:45.090Z","dependencies_parsed_at":"2023-12-25T07:27:36.803Z","dependency_job_id":"ae5704be-216a-43d0-8a96-9388b681ac7b","html_url":"https://github.com/zchengsite/hexo-theme-oranges","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zchengsite%2Fhexo-theme-oranges","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zchengsite%2Fhexo-theme-oranges/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zchengsite%2Fhexo-theme-oranges/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zchengsite%2Fhexo-theme-oranges/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zchengsite","download_url":"https://codeload.github.com/zchengsite/hexo-theme-oranges/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-theme","minimalism","theme"],"created_at":"2024-07-31T02:01:06.193Z","updated_at":"2024-10-27T11:30:17.465Z","avatar_url":"https://github.com/zchengsite.png","language":"JavaScript","funding_links":[],"categories":["Content"],"sub_categories":[],"readme":"[English](https://github.com/zchengsite/hexo-theme-oranges/blob/master/README.md) | 简体中文\n\n# hexo-theme-oranges\n\n\u003e 一个简单的 hexo 主题\n\n[demo](https://hexo.theme.oranges.zcheng.site/)\n\n## 安装\n\n为了更为便捷的更新主题，建议使用添加 Git 子模块的方法安装，在 hexo 博客项目根目录下执行，会将`oranges`主题 clone 至`themes`文件夹下。\n\n```bash\ngit submodule add https://github.com/zchengsite/hexo-theme-oranges.git themes/oranges\n```\n\n日后更新主题只需要在主题根目录执行`git pull`命令即可。\n\n## 使用\n\n在 hexo 博客项目根目录下找到`_config.yml`文件，修改其中`theme`字段为主题名`oranges`\n\n```yml\ntheme: oranges\n```\n\n复制主题文件夹下的`_config.yml`文件到博客根目录并改名为`_config.oranges.yml`，后续修改主题操作均在`_config.oranges.yml`中进行。\n\n## 配置\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eTags page\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n在 hexo 博客项目根目录下执行，在`source`文件夹下生成`tags`文件夹\n\n```bash\nhexo new page tags\n```\n\n接着修改`tags`文件夹下`index`为以下内容\n\n```markdown\n---\ntitle: tags\ndate: 2019-05-03 12:03:35\ntype: \"tags\"\ncategories:\ntags:\n---\n```\n\n并在配置文件`_config.oranges.yml`修改对应`enable`为`true`，如不想展示，设置为`false`即可\n\n```yml\nnavbar:\n  -\n    name: 标签\n    enable: true\n    path: /tags/\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eFriends page\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n在 hexo 博客项目根目录下执行，在`source`文件夹下生成`friends`文件夹\n\n```bash\nhexo new page friends\n```\n\n接着修改`friends`文件夹下`index`为以下内容\n\n```markdown\n---\ntitle: tags\ndate: 2019-05-03 12:03:35\ntype: \"friends\"\ncategories:\ntags:\n---\n```\n\n并在配置文件`_config.oranges.yml`修改对应`enable`为`true`，如不想展示，设置为`false`即可\n\n```yml\nnavbar:\n  -\n    name: 朋友\n    enable: true\n    path: /friends/\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eAbout me page\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n在 hexo 博客项目根目录下执行，在`source`文件夹下生成`about`文件夹\n\n```bash\nhexo new page about\n```\n\n接着修改`about`文件夹下`index`为以下内容\n\n```markdown\n---\ntitle: tags\ndate: 2019-05-03 12:03:35\ntype: \"about\"\ncategories:\ntags:\n---\n```\n\n并在配置文件`_config.oranges.yml`修改对应`enable`为`true`，如不想展示，设置为`false`即可\n\n```yml\nnavbar:\n  -\n    name: 关于我\n    enable: true\n    path: /about/\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eCategories page\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n在 hexo 博客项目根目录下执行，在`source`文件夹下生成`categories`文件夹\n\n```bash\nhexo new page categories\n```\n\n接着修改`categories`文件夹下`index`为以下内容\n\n```markdown\n---\ntitle: tags\ndate: 2019-05-03 12:03:35\ntype: \"categories\"\ncategories:\ntags:\n---\n```\n\n并在配置文件`_config.oranges.yml`修改对应`enable`为`true`，如不想展示，设置为`false`即可\n\n```yml\nnavbar:\n  -\n    name: 分类\n    enable: true\n    path: /categories/\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e文章目录 (Catalog)\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n在配置文件`_config.oranges.yml`下`catalog`修改`enable`为`true`，如不想展示，设置为`false`即可\n\n```yml\ncatalog:\n  enable: true\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eRSS\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n1.安装`hexo-generator-feed`[官方插件](https://github.com/hexojs/hexo-generator-feed)\n\n```shell\nnpm install hexo-generator-feed --save\n```\n\n2.在博客项目配置文件`_config.yml`(非主题配置文件) 增加：\n\n```yml\nfeed:\n  type: atom\n  path: atom.xml\n  limit: 20\n  hub:\n  content:\n  content_limit: 140\n  content_limit_delim: ' '\n  order_by: -date\n  icon: icon.png\n  autodiscovery: true\n  template:\n```\n\n3.开启 rss 按钮\n在配置文件`_config.oranges.yml`增加页脚项：\n\n```yml\nfooter:\n  social:\n    -\n      name: rss\n      icon: rss\n      path: /atom.xml\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e评论系统 (Comment)\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n1.确保配置文件`_config.oranges.yml`下`comments`-\u003e`enable: true`\n\n2.目前支持以下几种评论插件\n\n- [valine](https://valine.js.org/quickstart.html)\n- [gitalk](https://github.com/gitalk/gitalk#usage)\n- [disqus](https://disqus.com)(需科学上网)\n\n3.如需使用，修改相应评论下`enable: true`\n\n4.查看评论插件官方教程获取相应的字段填入即可使用\n\n以`valine`为例，注册`valine`并获取`appId`\u0026`appKey`填入即可使用\n\n```yml\ncomments:\n  enable: true\n  valine:\n    # https://valine.js.org/quickstart.html#%E8%8E%B7%E5%8F%96APP-ID-%E5%92%8C-APP-Key\n    enable: true\n    appId: xxxxxxxx\n    appKey: xxxxxxxxx\n    placeholder: welcome!\n    avatar: retro\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eGoogle Analytics\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n[Google Analytics](https://analytics.google.com)\n注册 Google 分析账号，在管理/创建媒体资源/选择网站/填写相关信息后得到跟踪 Id，一般格式为 UA-xxxxxxx-x\n如之前已有注册账号，在管理/跟踪信息/跟踪代码/找到跟踪 ID，一般格式为 UA-xxxxxxx-x\n\n```yml\ngtag:\n  enable: true\n  gtagkey: UA-xxxxxxx-x\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003ePREV \u0026 NEXT\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n文章末尾的上一篇与下一篇功能。\n\n```yml\nprevnext:\n  enable: true\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e文章图片懒加载 (Lazy image loading)\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n安装插件[hexo-lazyload-image](https://github.com/Troy-Yang/hexo-lazyload-image)\n\n```bash\nnpm install hexo-lazyload-image --save\n```\n\n项目配置文件`_config.yml`（非主题配置文件）下添加：\n\n```yml\nlazyload:\n  enable: true\n  onlypost: false # optional\n  loadingImg: # optional eg ./images/loading.gif\n  isSPA: false # optional\n```\n\n详情可见[hexo-lazyload-image](https://github.com/Troy-Yang/hexo-lazyload-image)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e全文搜索 (search)\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n  1.安装插件[hexo-generator-search](https://github.com/wzpan/hexo-generator-search)\n\n  ```bash\n  npm install hexo-generator-search --save\n  ```\n\n  2.项目配置文件`_config.yml`（非主题配置文件）下添加：\n\n  ```yml\n  search:\n    path: search.xml\n    field: post\n    content: true\n  ```\n\n  详情可见[hexo-generator-search](https://github.com/wzpan/hexo-generator-search)\n\n  3.主题配置文件`_config.yml`下找到`search`，修改`enable`为`true`:\n\n  ```yml\n    # 文章搜索\n    search:\n      enable: true\n      placeholder: 搜索...\n  ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e文章置顶 (pinned posts)\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n  1.安装插件[hexo-generator-index-pin-top](https://github.com/netcan/hexo-generator-index-pin-top)。\n\n  ```bash\n  npm uninstall hexo-generator-index --save\n  npm install hexo-generator-index-pin-top --save\n  ```\n\n  2.项目配置文件`_config.yml`（非主题配置文件）下添加（如已有请忽略）：\n\n  ```yml\n  index_generator:\n    path: ''\n    per_page: 10\n    order_by: -date\n  ```\n\n  详情可见[hexo-generator-index-pin-top](https://github.com/netcan/hexo-generator-index-pin-top)。\n\n  3.在所需置顶的文章 front-matter 头中添加`top: true`即可：\n\n  ```markdown\n  ---\n  title: Hello World\n  date: 2020-03-11 14:19:04\n  top: true\n  tags:\n  - Welcome\n  categories:\n  - [Welcome，欢迎]\n---\n  ```\n\n  4.重启服务后，可在主页文章标题看到置顶图标。\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e国际化 (i18n)\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n  现在页面部分元素支持以不同语言显示，通过修改项目配置文件`_config.yml`（非主题配置文件）中的`language`:\n\n  举几个例子：\n  \n  英文：\n\n  ```yml\n  language: en\n  ```\n\n  中文：\n\n  ```yml\n  language: zh-CN\n  ```\n\n  日文：\n\n  ```yml\n  language: ja\n  ```\n\n  默认值为`en`，可选项在主题下`languages`语言文件中查看，修改为对应文件名即可。\n  \n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e主题配色切换\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n  拉取最新仓库，在配置文件`_config.oranges.yml`中添加或修改`colorSwitch`字段，确保`enable`为`true`:\n\n  ```yml\n  colorSwitch:\n    enable: true\n  ```\n\n重新运行项目，页面右下角会出现切换主题模式的开关。\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e文章分享\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n  拉取最新仓库，在配置文件`_config.oranges.yml`中添加或修改`postShare`字段，确保`enable`为`true`:\n\n  ```yml\n  postShare:\n    enable: true\n\n    twitter:\n      enable: true\n  ```\n\n重新运行项目，文章页面右下角会出现分享的按钮。\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003e文章加密\u003c/b\u003e (click to show)\u003c/summary\u003e\n\n  拉取最新仓库代码，安装[hexo-blog-encrypt](https://github.com/D0n9X1n/hexo-blog-encrypt) 插件：\n\n  ```bash\n  npm install --save hexo-blog-encrypt\n  ```\n\n  在你要加密文章头部 Front-matter 中添加 password：\n\n  ```yml\n    ---\n    title: Hello World!\n    date: 2020-09-27 10:42:38\n    tags:\n      - World\n      - Hello\n    password: hello\n    ---\n  ```\n\n  更多可查看[hexo-blog-encrypt](https://github.com/D0n9X1n/hexo-blog-encrypt/blob/master/ReadMe.zh.md)\n\n\u003c/details\u003e\n\n## To Do List\n\n- [x] 自定义导航，可灵活配置自己想要的导航✔\n- [x] toc 文章目录展示✔\n  - [x] 优化超出屏幕部分滚动显示，并自动跟随文章内容滚动`[2020.5.24]`✔\n- [x] Fancybox，支持文章内图片友好浏览✔\n- [x] 回到页面顶部`[2020.5.4]`✔\n- [x] RSS Feed`[2020.5.7]`✔\n- [x] 文章页末增加 NEXT \u0026 PREV`[2020.5.10]`✔\n- [x] 文章标题锚点`[2020.5.3]`✔\n- [x] 评论系统`[2020.5.7]`✔\n- [x] 分享功能`[2021.8.22]`✔\n- [ ] 文章字数统计\n- [ ] 页面访问量统计\n- [x] Google 分析`[2020.5.8]`✔\n- [x] 文章加密`[2022.3.23]`✔\n- [x] 文章置顶`[2020.9.1]`✔\n- [x] 全文搜索功能`[2020.8.23]`✔\n- [x] 主题配色切换 `[2021.7.10]`✔\n- [x] 页面平滑滚动`[2020.5.4]`✔\n- [ ] 主题样式可自定义配置\n- [x] 国际化（i18n），支持多语言`[2020.9.10]`✔\n\n## End\n\n有问题请提交 Issue，欢迎 Fork。\n\n如果觉得主题还不错，请点击 Star 支持下。\n\n🍻\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzchengsite%2Fhexo-theme-oranges","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzchengsite%2Fhexo-theme-oranges","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzchengsite%2Fhexo-theme-oranges/lists"}