{"id":13430647,"url":"https://github.com/cofess/hexo-theme-pure","last_synced_at":"2025-05-16T03:03:53.251Z","repository":{"id":23742379,"uuid":"93917130","full_name":"cofess/hexo-theme-pure","owner":"cofess","description":"Hexo theme pure. It's a pure theme for Hexo.","archived":false,"fork":false,"pushed_at":"2023-09-25T14:50:53.000Z","size":4773,"stargazers_count":1099,"open_issues_count":100,"forks_count":292,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-10-29T19:59:42.822Z","etag":null,"topics":["blog-theme","hexo","hexo-awesome-theme","hexo-blog","hexo-blog-theme","hexo-bootstrap-theme","hexo-nice-theme","hexo-template","hexo-theme","theme"],"latest_commit_sha":null,"homepage":"http://blog.cofess.com","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/cofess.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,"roadmap":null,"authors":null}},"created_at":"2017-06-10T05:06:19.000Z","updated_at":"2024-10-23T11:27:15.000Z","dependencies_parsed_at":"2024-01-18T14:41:10.682Z","dependency_job_id":"7ceaa887-c055-4e18-9c20-980ce2a49cdf","html_url":"https://github.com/cofess/hexo-theme-pure","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofess%2Fhexo-theme-pure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofess%2Fhexo-theme-pure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofess%2Fhexo-theme-pure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cofess%2Fhexo-theme-pure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cofess","download_url":"https://codeload.github.com/cofess/hexo-theme-pure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459084,"owners_count":22074604,"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":["blog-theme","hexo","hexo-awesome-theme","hexo-blog","hexo-blog-theme","hexo-bootstrap-theme","hexo-nice-theme","hexo-template","hexo-theme","theme"],"created_at":"2024-07-31T02:00:56.120Z","updated_at":"2025-05-16T03:03:48.235Z","avatar_url":"https://github.com/cofess.png","language":"CSS","funding_links":[],"categories":["Content"],"sub_categories":[],"readme":"# pure\n\nA brand new default theme for [[Hexo](https://hexo.io)].  [Preview](http://cofess.github.io/) | [English documentation](README.md) | [iconfont](http://blog.cofess.com/hexo-theme-pure/iconfont/demo_fontclass.html)\n\n![](screenshot/pure.png)\n\n## 特色\n\n- 多语言\n- 第三方评论框（友言、来必力、gitment、gitalk）\n- 可展示个人豆瓣书单\n- 可展示个人github托管项目\n- 可设置支付宝、微信打赏\n\n## 主题颜色\n\n![](screenshot/pure-theme-black.png)\n\n![](screenshot/pure-theme-blue.png)\n\n![](screenshot/pure-theme-green.png)\n\n![](screenshot/pure-theme-purple.png)\n\n## 页面展示\n\n[首页](http://cofess.github.io/) | [归档](http://cofess.github.io/archives/) | [分类](http://cofess.github.io/categories/) | [标签](http://cofess.github.io/tags/) | [项目](http://cofess.github.io/repository/) | [书单](http://cofess.github.io/books/) | [友链](http://cofess.github.io/links/) | [关于](http://cofess.github.io/about/)\n\n## 配置说明\n\n在 Hexo 中有两份主要的配置文件，其名称都是 _config.yml。 其中，一份位于站点根目录下，主要包含 Hexo 本身的配置；另一份位于主题目录下，这份配置由主题作者提供，主要用于配置主题相关的选项。为了描述方便，在以下说明中，将前者称为站点配置文件， 后者称为主题配置文件\n\n## 安装主题\n\n```\ngit clone https://github.com/cofess/hexo-theme-pure.git themes/pure\n```\n## 更新主题\n\n```\ncd themes/pure\ngit pull\n```\n## 启用pure主题\n\n打开站点配置文件，找到theme字段，将其值更改为 pure\n\n```\ntheme: pure\n```\n\n到此，主题安装完成。然后启动Hexo服务验证主题是否正确启用。\n\n```\nhexo s\n```\n\n## 安装插件\n\n### [hexo-wordcount](https://github.com/willin/hexo-wordcount)\n\n```\nnpm install hexo-wordcount --save\n```\n### [hexo-generator-json-content](https://github.com/alexbruno/hexo-generator-json-content)\n\n```\nnpm install hexo-generator-json-content --save\n```\n### [hexo-generator-feed](https://github.com/hexojs/hexo-generator-feed)\n\n```\nnpm install hexo-generator-feed --save\n```\n### [hexo-generator-sitemap](https://github.com/hexojs/hexo-generator-sitemap)\n\n```\nnpm install hexo-generator-sitemap --save\n```\n### [hexo-generator-baidu-sitemap](https://github.com/coneycode/hexo-generator-baidu-sitemap)\n\n```\nnpm install hexo-generator-baidu-sitemap --save\n```\n## 主题配置\n\n### 设置语言\n\n打开站点配置文件, 将 language 设置成你所需要的语言。建议明确设置你所需要的语言,可选值对应themes\\pure\\languages目录下语言文件，简体中文配置如下：\n\n```\nlanguage: zh-CN\n```\n\n### 主题颜色\n\n定制了五套颜色，默认白，黑:theme-black，蓝:theme-blue，绿:theme-green，紫:theme-purple\n\n```\n# config\nconfig:\n  skin: # 主题颜色 theme-black theme-blue theme-green theme-purple\n```\n\n### 导航菜单\n\n```\n# 导航菜单\nmenu:\n  Home: . \n  Archives: archives # 归档\n  Categories: categories # 分类\n  Tags: tags # 标签\n  Repository: repository # github repositories\n  Books: books     # 书单\n  Links: links # 友链\n  About: about # 关于\n\n# 导航菜单图标（font awesome）\nmenu_icons:\n  enable: true # 是否启用菜单图标\n  home: icon-home-fill\n  archives: icon-archives-fill\n  categories: icon-folder\n  tags: icon-tags\n  repository: icon-project\n  books: icon-book-fill\n  links: icon-friendship\n  about: icon-cup-fill\n```\n\n### 设置个人信息\n\n```\n头像在themes\\pure\\source\\images 目录下替换图片即可，捐献的二维码同理。\n\n个人信息大部分都在 主题配置文件 中设置\n```\n\n### 搜索\n\n主题内置三种站内搜索方式：insight、swiftype、baidu\n\n```\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\n```\n\n### 分享\n\n支持`weibo,qq,qzone,wechat,tencent,douban,diandian,facebook,twitter,google,linkedin`\n\n```\n# Share\n# weibo,qq,qzone,wechat,tencent,douban,diandian,facebook,twitter,google,linkedin\nshare:\n  enable: true  # 是否启用分享\n  sites: weibo,qq,wechat,facebook,twitter  # PC端显示的分享图标\n  mobile_sites: weibo,qq,qzone  # 移动端显示的分享图标\n```\n\n### 评论\n\n主题集成了[disqus](https://disqus.com/)、[友言](http://www.uyan.cc/)、[来必力](https://livere.com/)、[gitment](https://github.com/imsun/gitment)、[gitalk](https://github.com/gitalk/gitalk)评论系统，选择其中一种即可\n\n```\n# Comment\n# Gitment\n# Introduction: https://imsun.net/posts/gitment-introduction/\ncomment:\n  type: livere # 启用哪种评论系统\n  disqus:  # enter disqus shortname here\n  youyan: \n    uid: *** # enter youyan uid \n  livere:\n    uid: *** # enter livere uid\n  gitment:\n    githubID: username\n    repo: username.github.io\n    ClientID: ***\n    ClientSecret: ***\n    lazy: false\n```\n\n### 文章浏览量统计\n\n主题内置了不蒜子和leancloud来统计文章浏览量，启用其中之一即可，注意leancloud需要到其官网申请APP ID 和APP Key。\n\n比如，启用不蒜子来统计文章浏览量，在主题配置文件中把busuanzi设置为true即可：\n\n```\npv:\n  busuanzi:\n    enable: true  # 不蒜子统计\n```\n\n如果不需要第三方来统计浏览量，只需将相应设置改为false即可（设置为false后不会加载第三方JS脚本）\n\n### 项目\n\n复制`theme/pure/_source/` 目录下`repository`文件夹到`blog path/source/` 目录下\n\n新版配置（支持 Github 和 Gitee）：\n\n*新版配置将会覆盖旧版的 github 配置！*\n\n```\n# Repository Info (This will override 'github' option)\n# 项目仓库展示信息（将会覆盖 github 项）\nrepository:\n  platform: github # 托管平台（github | gitee）\n  username: *** # 用户名\n```\n\n旧版配置（仅支持 Github）：\n\n```\n# Github\ngithub: \n  username: ***  # github username\n```\n\n### 豆瓣书单\n\n复制`theme/pure/_source/` 目录下`books`文件夹到`blog path/source/` 目录下\n\n```\n# douban 豆瓣书单\ndouban:\n  user: *** # 豆瓣用户名\n  start: 0 # 从哪一条记录开始\n  count: 100 # 获取豆瓣书单数据条数\n```\n\n### 友情链接\n\n复制`theme/pure/_source/` 目录下`links`文件夹到`blog path/source/` 目录下\n\n在 hexo 目录下的 source 文件夹内创建一个名为 _data（禁止改名）的文件夹。\n\n然后在文件内创建一个名为 links.yml 的文件,在其中添加相关数据即可。\n\n单个友情链接的格式为：\n\n```\nName:\n    link: http://example.com\n    avatar: http://example.com/avatar.png\n    desc: \"这是一个描述\"\n```\n\n添加多个友情链接，我们只需要根据上面的格式重复填写即可。\n\n. 将 Name 改为友情链接的名字，例如 Cofess。\n\n. http://example.com 为友情链接的地址。\n\n. http://example.com/avatar.png 为友情链接的头像。\n\n. 这是一个描述 为友情链接描述。\n\n### 文章索引目录\n\n```\ntitle: 文章标题\ncategories:\n  - 文章分类\ntags:\n  - 文章标签\ntoc: true # 是否启用内容索引\n```\n\n### sidebar侧边栏\n\n文章侧边栏默认为开启状态，如果某篇文章不想开启侧边栏，在文章开头配置加入“sidebar: none”即可：\n\n```\ntitle: 文章标题\ncategories:\n  - 文章分类\ntags:\n  - 文章标签\nsidebar: none # 是否启用sidebar侧边栏，none：不启用\n```\n\n## 博客优化\n\n### [hexo-neat](https://github.com/rozbo/hexo-neat)\n\n\u003e auto Minify html、js、css and make it neat\n\n```\nnpm install hexo-neat --save\n```\n\n在博客配置文件`_config.yml`中添加\n\n```\n# hexo-neat\nneat_enable: true\nneat_html:\n  enable: true\n  exclude:  \nneat_css:\n  enable: true\n  exclude:\n    - '*.min.css'\nneat_js:\n  enable: true\n  mangle: true\n  output:\n  compress:\n  exclude:\n    - '*.min.js' \n```\n\n### [hexo-baidu-url-submit](https://github.com/huiwang/hexo-baidu-url-submit)\n\n```\nnpm install hexo-baidu-url-submit --save\n```\n\n### [hexo-translate-title](https://github.com/cometlj/hexo-translate-title)\n\n\u003e 使用Google翻译，百度翻译和有道翻译将Hexo中的汉字标题转成英文标题\n\n安装\n\n```\nnpm install hexo-translate-title --save\n```\n\n在博客配置文件`_config.yml`中添加\n\n```yml\ntranslate_title:\n  translate_way: google    #google | baidu | youdao\n  youdao_api_key: XXX\n  youdao_keyfrom: XXX\n  is_need_proxy: true     #true | false\n  proxy_url: http://localhost:8123\n```\n\n**注意**：判断是否需要配置google本地代理，因为我在本地是开启时才能访问google翻译的，如果没有被墙，请将`_config.yml` 下的`is_need_proxy: true`改为false。如果设置为true,请设置本地代理地址\n\n## 数学公式\n\n\u003e Hexo默认使用\"hexo-renderer-marked\"引擎渲染网页，该引擎会把一些特殊的markdown符号转换为相应的html标签\n\n### 解决方案\n\n解决方案有很多，可以网上搜下，为了节省大家的时间，这里只提供亲身测试过的方法。\n\n更换Hexo的markdown渲染引擎，[hexo-renderer-markdown-it-plus](https://github.com/CHENXCHEN/hexo-renderer-markdown-it-plus)引擎替换默认的渲染引擎[hexo-renderer-marked](https://github.com/hexojs/hexo-renderer-marked)即可。\n\n### 安装hexo-renderer-markdown-it-plus插件\n\n```\nnpm un hexo-renderer-marked --save\nnpm i hexo-renderer-markdown-it-plus --save\n```\n\n### 配置\n\n安装插件后，如果未正常渲染LaTeX数学公式，在博客配置文件`_config.yml`中添加\n\n```\nmarkdown_it_plus:\n  highlight: true\n  html: true\n  xhtmlOut: true\n  breaks: true\n  langPrefix:\n  linkify: true\n  typographer:\n  quotes: “”‘’\n  plugins:\n    - plugin:\n        name: markdown-it-katex\n        enable: true\n    - plugin:\n        name: markdown-it-mark\n        enable: false  \n```\n\n### 文章启用mathjax\n\n```\ntitle: Hello World\nmathjax: true\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofess%2Fhexo-theme-pure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcofess%2Fhexo-theme-pure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcofess%2Fhexo-theme-pure/lists"}