{"id":13430850,"url":"https://github.com/iTimeTraveler/hexo-theme-hiker","last_synced_at":"2025-03-16T06:31:31.769Z","repository":{"id":75886762,"uuid":"68099502","full_name":"iTimeTraveler/hexo-theme-hiker","owner":"iTimeTraveler","description":"An attractive theme for Hexo. called \"Hiker\", short for \"HikerNews\".","archived":false,"fork":false,"pushed_at":"2020-02-21T04:59:55.000Z","size":32741,"stargazers_count":367,"open_issues_count":56,"forks_count":85,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-05-20T09:17:55.611Z","etag":null,"topics":["hexo","hexo-theme"],"latest_commit_sha":null,"homepage":"https://itimetraveler.github.io/hexo-theme-hiker/","language":"CSS","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/iTimeTraveler.png","metadata":{"files":{"readme":"README.cn.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}},"created_at":"2016-09-13T10:42:47.000Z","updated_at":"2024-03-22T17:23:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"7b9486a3-25ff-4fc5-acc0-0855453e2090","html_url":"https://github.com/iTimeTraveler/hexo-theme-hiker","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/iTimeTraveler%2Fhexo-theme-hiker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTimeTraveler%2Fhexo-theme-hiker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTimeTraveler%2Fhexo-theme-hiker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iTimeTraveler%2Fhexo-theme-hiker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iTimeTraveler","download_url":"https://codeload.github.com/iTimeTraveler/hexo-theme-hiker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221656446,"owners_count":16858772,"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.402Z","updated_at":"2024-10-27T09:31:00.235Z","avatar_url":"https://github.com/iTimeTraveler.png","language":"CSS","funding_links":[],"categories":["Content","CSS"],"sub_categories":[],"readme":"# Hiker\n\n[![Build Status](https://travis-ci.org/iTimeTraveler/hexo-theme-hiker.svg?branch=master)](https://travis-ci.org/iTimeTraveler/hexo-theme-hiker)\t\t[![Gitter](https://camo.githubusercontent.com/079d8764b5eebffbb7158fb375df0959029ab2c3/68747470733a2f2f6261646765732e6769747465722e696d2f6865786f2d7468656d652d696e6469676f2f4c6f6262792e737667)](https://gitter.im/hexo-theme-hiker/Lobby?utm_source=share-link\u0026utm_medium=link\u0026utm_campaign=share-link)\n\n\nAn attractive, exquisite theme for [Hexo]. named \"Hiker\", short for \"HikerNews\".  \n\n[**☞ 在线预览**](https://itimetraveler.github.io/hexo-theme-hiker/)  |  [**Hiker问题交流群**](https://gitter.im/hexo-theme-hiker/Lobby?utm_source=share-link\u0026utm_medium=link\u0026utm_campaign=share-link)\n\n\n![Desktop Preview](https://itimetraveler.github.io/hexo-theme-hiker/2016/10/24/Hiker%E4%B8%BB%E9%A2%98%E9%A2%84%E8%A7%88/homepage-index.png)\n![Post Preview](https://itimetraveler.github.io/hexo-theme-hiker/2016/10/24/Hiker%E4%B8%BB%E9%A2%98%E9%A2%84%E8%A7%88/article-chrome.png)\n![Mobile Preview](https://github.com/iTimeTraveler/hexo-theme-hiker/blob/master/source/preview/preview-mobile.png?raw=true)\n\n\u003c!--more--\u003e\n\n以上Demo站点的源文件在这里，大家有需要的可以参考：https://github.com/iTimeTraveler/hexo-theme-hiero/tree/site-source\n\n## 安装步骤\n\n 1. 从GitHub上获取代码\n\n```shell\n $ git clone https://github.com/iTimeTraveler/hexo-theme-hiker.git themes/hiker\n```\n 2. 启用\n\n 把Hexo主目录下的 `_config.yml` 文件中的字段 `theme` 修改为 `hiker`.\n ```\n # Extensions\n ## Plugins: http://hexo.io/plugins/\n ## Themes: http://hexo.io/themes/\n theme: hiker\n ```\n 3. 更新\n\n```shell\n $ cd themes/Hiker\n $ git pull\n```\n\n\n## 特性\n\n### 自定义首页背景\n\n您可以将选择的大图放到 `YOUR_HEXO_SITE\\themes\\hiker\\source\\css\\images` 文件夹下. 然后更改 hiker/_config.yml文件里的`home_background_image`字段. \n\n```yml\n# Homepage\n# eg. home_background_image: [css/images/home-bg.jpg, http://t.cn/RMbvEza]\n# eg. mode: image | polyline | trianglify\nhome_background_image:\n  enable: true\n  mode: image\n  rolling: true\n  url: [css/images/home-bg.jpg, css/images/sample.jpg, https://source.unsplash.com/collection/954550/1920x1080]\n```\n\n首页背景填充方式有三种可选mode：\n\n- `image`: 大图模式\n- `trianglify`: 多边形渐变背景\n- `polyline`: 随机彩色折线\n\n默认配置为`image`模式，也就是大图模式。多边形渐变背景`polyline`模式来自[Trianglify](https://github.com/qrohlf/trianglify)大致如下图：\n\n![](https://cloud.githubusercontent.com/assets/347189/6771063/f8b0af46-d090-11e4-8d4c-6c7ef5bd9d37.png)\n\n如果你不中意以上两种背景填充方式，可以选择随机彩色折线`polyline`模式，长相参考下图。\n\n\u003e ！！注意：如果在使用`image`模式时`url`为空（`enable`仍然保持true）, 主题也会自动使用下面这种**`漂亮的随机线条` **填充（也就是会自动退化为`polyline`模式）：\n\n![](https://itimetraveler.github.io/hexo-theme-hiker/2016/10/24/Hiker%E4%B8%BB%E9%A2%98%E9%A2%84%E8%A7%88/home-no-background1.png)\n\n\n### Code 色彩主题\n\nHiker 使用[Tomorrow Theme](https://github.com/chriskempson/tomorrow-theme) 作为代码高亮的配色. 总共有六种选择: `default`, `normal`, `night`, `night blue`, `night bright`, `night eighties`\n\n![code `default` theme Preview](https://itimetraveler.github.io/hexo-theme-hiker/2016/10/24/Hiker%E4%B8%BB%E9%A2%98%E9%A2%84%E8%A7%88/code-theme-default.png)\n\n默认高亮配色如上图。 另外的五种配色如下.\n\n![code themes](https://github.com/iTimeTraveler/hexo-theme-hiker/blob/master/source/preview/code-theme.jpg?raw=true)\n\nModify `highlight_theme` in hiker/_config.yml.\n\n```yml\n# Code Highlight theme\n# Available value:\n#    default | normal | night | night eighties | night blue | night bright\n# https://github.com/chriskempson/tomorrow-theme\nhighlight_theme: default\n```\n\n### 博客主题色\n\nHiker 为你的博客提供了五种可选的主题色，可以配置成`random`, 每次生成博客时会自动随机使用一个主题色.\n\n![theme colors](https://github.com/iTimeTraveler/hexo-theme-hiker/blob/master/source/preview/theme-color.png?raw=true)\n\n- \u003cspan style=\"display: inline-block; width: 18px; height: 18px; margin: 0 4px; background-color: #fb6d19; border-radius: 3px; vertical-align: middle;\"\u003e\u003c/span\u003e orange\n- \u003cspan style=\"display: inline-block; width: 18px; height: 18px; margin: 0 4px; background-color: #00aced; border-radius: 3px; vertical-align: middle;\"\u003e\u003c/span\u003e blue\n- \u003cspan style=\"display: inline-block; width: 18px; height: 18px; margin: 0 4px; background-color: #f03838; border-radius: 3px; vertical-align: middle;\"\u003e\u003c/span\u003e red\n- \u003cspan style=\"display: inline-block; width: 18px; height: 18px; margin: 0 4px; background-color: #39aa56; border-radius: 3px; vertical-align: middle;\"\u003e\u003c/span\u003e green\n- \u003cspan style=\"display: inline-block; width: 18px; height: 18px; margin: 0 4px; background-color: #404040; border-radius: 3px; vertical-align: middle;\"\u003e\u003c/span\u003e black\n\nYou can modify `theme_color` in hiker/_config.yml.\n\n```yml\n# Article theme color\n# Available value:\n#    random | orange | blue | red | green | black\ntheme_color: random\n```\n\n### 夜间模式\n\n只有在文章阅读页面，点击左上角的logo图片，就能打开设置对话框，操作如下图\n\n![](https://itimetraveler.github.io/hexo-theme-hiker/2016/10/24/Hiker%E4%B8%BB%E9%A2%98%E9%A2%84%E8%A7%88/night-mode.gif)\n\n\n### 站内搜索\n\nHiker 使用 `Insight Search` 实现了站内搜索，在_config.yml文件中启用如下.\n\n```yml\n# Search\nsearch:\n    insight: true # you need to install `hexo-generator-json-content` before using Insight Search\n    swiftype: # enter swiftype install key here\n    baidu: false # you need to disable other search engines to use Baidu search, options: true, false\n```\n\n\u003e **！注意**: 在使用搜索功能前必须在Hexo目录下使用以下命令安装 `hexo-generator-json-content` 插件.\n\n```bash\n$ npm install -S hexo-generator-json-content\n```\n\n### Fancybox\n\nHiker使用[Fancybox]来浏览展示您文章中的图片，支持以下方式在文章中添加图片：\n\n```\n![img caption](img url)\n\n{% fancybox img_url [img_thumbnail] [img_caption] %}\n```\n\n### 侧边栏\n\n`sidebar`（侧边栏位置）可以设置为 `left` , `right`, `bottom`.\n\nHiker 有以下5种侧边栏插件:\n\n- category\n- tag\n- tagcloud\n- archives\n- recent_posts\n\nAll of them are enabled by default. You can edit them in `widget` setting.\n\n\n\n### 打赏捐赠按钮\n\n![](https://github.com/iTimeTraveler/hexo-theme-hiker/blob/master/source/preview/donation-btn.png)\n\n每篇文章最后显示打赏按钮，目前仅支持微信支付和支付宝两种打赏方式。您可以在文件 `hiker/_config.yml` 中配置您的微信、支付宝付款二维码图片的URL:\n\n### 主页文章摘要\n![](https://github.com/iTimeTraveler/hexo-theme-hiker/blob/master/source/preview/preview-abstract.png)   \n\n主页文章默认开启摘要模式\n```yml\n# 开启主页摘要\npost_excerpt: true\n\n```\n\n\n```yml\n# donation button\ndonate:\n    enable: true\n    message: '如果觉得我的文章对您有用，请随意打赏。您的支持将鼓励我继续创作!'\n    wechatImage: https://your_WECHAT_PAY_ImageUrl\n    alipayImage: https://your_ALIPAY_ImageUrl\n```\n\n\n\n### 评论\n\n已完全支持原生Disqus、livere（来必力）、wumii（无觅）评论系统。因多说、网易云跟帖均已停止服务，在国内建议大家使用相对稳定的来必力评论系统。在文件 `hiker/_config.yml` 中修改以下代码片段:\n\n```yml\n# comment ShortName, you can choose only ONE to display.\ngentie_productKey: #网易云跟帖your-gentie-product-key\nduoshuo_shortname: \ndisqus_shortname: \nlivere_shortname: MTAyMC8yOTQ4MS82MDQ5\nuyan_uid: \nwumii: \n```\n\n- #### 网易云跟帖说明（已停止服务）\n\n登陆 [网易云跟帖](https://gentie.163.com/) 获取你的 Product Key。请注意，您在**`云跟帖管理后台设置的域名必须跟您站点的域名一致`**。在本地测试时，需要做两步骤前置设定：\n\n1. 修改 hosts 文件，将您域名的请求指向本地。例如：127.0.0.1 yoursite.com\n2. 修改 Hexo 监听的端口为 80：`hexo s --debug -p 80`\n\n测试完成后请将 hosts 文件中的域名映射删除即可。\n\n## 支持的浏览器\n\n![](https://github.com/iTimeTraveler/hexo-theme-hiker/blob/master/source/preview/browser-support.png?raw=true)\n\n\n## Contributing\n\n欢迎大家有各种问题和改进建议的，直接提issue或者评论，或者pull request都行。我会尽量抽时间和大家交流。刚接触Hexo不久，疏忽不足之处，还望大家海涵！\n\n\n[Hexo]: https://hexo.io/\n[Fancybox]: http://fancyapps.com/fancybox/\n[Font Awesome]: http://fontawesome.io/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiTimeTraveler%2Fhexo-theme-hiker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FiTimeTraveler%2Fhexo-theme-hiker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FiTimeTraveler%2Fhexo-theme-hiker/lists"}