代码拉取完成,页面将自动刷新
{"meta":{"title":"DevinShi2019","subtitle":" ","description":"","author":"Devin Shi","url":"http://devinshi2019.github.io","root":"/"},"pages":[{"title":"关于","date":"2021-05-27T11:27:29.970Z","updated":"2021-05-27T11:27:29.970Z","comments":false,"path":"about/index.html","permalink":"http://devinshi2019.github.io/about/index.html","excerpt":"","text":"个人详细介绍"},{"title":"书单","date":"2021-05-27T11:27:29.970Z","updated":"2021-05-27T11:27:29.970Z","comments":false,"path":"books/index.html","permalink":"http://devinshi2019.github.io/books/index.html","excerpt":"","text":""},{"title":"分类","date":"2019-11-25T02:10:43.000Z","updated":"2021-05-27T11:27:29.970Z","comments":true,"path":"categories/index.html","permalink":"http://devinshi2019.github.io/categories/index.html","excerpt":"","text":""},{"title":"友情链接","date":"2021-05-27T11:27:29.970Z","updated":"2021-05-27T11:27:29.970Z","comments":true,"path":"links/index.html","permalink":"http://devinshi2019.github.io/links/index.html","excerpt":"","text":""},{"title":"项目","date":"2019-11-25T02:13:45.000Z","updated":"2021-05-27T11:27:29.970Z","comments":false,"path":"repository/index.html","permalink":"http://devinshi2019.github.io/repository/index.html","excerpt":"","text":""},{"title":"标签","date":"2019-11-25T02:10:54.000Z","updated":"2021-05-27T11:27:29.970Z","comments":true,"path":"tags/index.html","permalink":"http://devinshi2019.github.io/tags/index.html","excerpt":"","text":""}],"posts":[{"title":"Hexo博客系列-3:使用主题pure","slug":"yuque/Hexo博客系列-3:使用主题pure","date":"2019-11-29T03:20:00.000Z","updated":"2021-05-27T11:27:59.683Z","comments":true,"path":"2019/11/29/yuque/Hexo博客系列-3:使用主题pure/","link":"","permalink":"http://devinshi2019.github.io/2019/11/29/yuque/Hexo%E5%8D%9A%E5%AE%A2%E7%B3%BB%E5%88%97-3%EF%BC%9A%E4%BD%BF%E7%94%A8%E4%B8%BB%E9%A2%98pure/","excerpt":"","text":"特色 多语言 第三方评论框(友言、来必力、gitment、gitalk) 可展示个人豆瓣书单 可展示个人github托管项目 可设置支付宝、微信打赏 配置说明 在 Hexo 中有两份主要的配置文件,其名称都是 _config.yml。 其中,一份位于站点根目录下,主要包含 Hexo 本身的配置;另一份位于主题目录下,这份配置由主题作者提供,主要用于配置主题相关的选项。为了描述方便,在以下说明中,将前者称为站点配置文件, 后者称为主题配置文件 安装主题 123git clone https://github.com/cofess/hexo-theme-pure.git themes/purecd themes/purerm -rf .git 启用pure主题 打开站点配置文件,找到theme字段,将其值更改为 pure 1theme: pure 到此,主题安装完成。然后启动Hexo服务验证主题是否正确启用。 1hexo s 安装插件 hexo-wordcount 1npm install hexo-wordcount --save hexo-generator-json-content 1npm install hexo-generator-json-content --save hexo-generator-feed 1npm install hexo-generator-feed --save hexo-generator-sitemap 1npm install hexo-generator-sitemap --save hexo-generator-baidu-sitemap 1npm install hexo-generator-baidu-sitemap --save 主题配置 设置语言 打开站点配置文件, 将 language 设置成你所需要的语言。建议明确设置你所需要的语言,可选值对应themes\\pure\\languages目录下语言文件,简体中文配置如下: 1language: zh-CN 主题颜色 定制了五套颜色,默认白,黑:theme-black,蓝:theme-blue,绿:theme-green,紫:theme-purple 123# configconfig: skin: # 主题颜色 theme-black theme-blue theme-green theme-purple 导航菜单 12345678910111213141516171819202122# 导航菜单menu: Home: . Archives: archives # 归档 Categories: categories # 分类 Tags: tags # 标签 Repository: repository # github repositories Books: books # 书单 Links: links # 友链 About: about # 关于# 导航菜单图标(font awesome)menu_icons: enable: true # 是否启用菜单图标 home: icon-home-fill archives: icon-archives-fill categories: icon-folder tags: icon-tags repository: icon-project books: icon-book-fill links: icon-friendship about: icon-cup-fill 设置个人信息 头像在themes\\pure\\source\\images 目录下替换图片即可,捐献的二维码同理。 个人信息大部分都在 主题配置文件 中设置 搜索 主题内置三种站内搜索方式:insight、swiftype、baidu 12345# Searchsearch: insight: true # you need to install `hexo-generator-json-content` before using Insight Search swiftype: # enter swiftype install key here baidu: false # you need to disable other search engines to use Baidu search 分享 支持weibo,qq,qzone,wechat,tencent,douban,diandian,facebook,twitter,google,linkedin 123456# Share# weibo,qq,qzone,wechat,tencent,douban,diandian,facebook,twitter,google,linkedinshare: enable: true # 是否启用分享 sites: weibo,qq,wechat,facebook,twitter # PC端显示的分享图标 mobile_sites: weibo,qq,qzone # 移动端显示的分享图标 评论 主题集成了disqus、友言、来必力、gitment、gitalk、valine评论系统,选择其中一种即可本文中选择valine主题,简洁大方 123456789101112comment: type: valine # 启用哪种评论系统 valine: # Valine. https://valine.js.org appid: # your leancloud application appid appkey: # your leancloud application appkey notify: false # mail notifier , https://github.com/xCss/Valine/wiki verify: false # Verification code placeholder: 每一份发言都值得被记录 # comment box placeholder avatar: mm # gravatar style meta: nick,mail,link # custom comment header pageSize: 10 # pagination size visitor: false # Article reading statistic https://valine.js.org/visitor.html 文章浏览量统计 主题内置了不蒜子和leancloud来统计文章浏览量,启用其中之一即可,注意leancloud需要到其官网申请APP ID 和APP Key。 比如,启用不蒜子来统计文章浏览量,在主题配置文件中把busuanzi设置为true即可: 123pv: busuanzi: enable: true # 不蒜子统计 如果不需要第三方来统计浏览量,只需将相应设置改为false即可(设置为false后不会加载第三方JS脚本) Github respostory 复制theme/pure/_source/ 目录下repository文件夹到blog path/source/ 目录下 123# Githubgithub: username: *** # github username 豆瓣书单 复制theme/pure/_source/ 目录下books文件夹到blog path/source/ 目录下 12345# douban 豆瓣书单douban: user: *** # 豆瓣用户名 start: 0 # 从哪一条记录开始 count: 100 # 获取豆瓣书单数据条数 友情链接 复制theme/pure/_source/ 目录下links文件夹到blog path/source/ 目录下 在 hexo 目录下的 source 文件夹内创建一个名为 _data(禁止改名)的文件夹。 然后在文件内创建一个名为 links.yml 的文件,在其中添加相关数据即可。 单个友情链接的格式为: 1234Name: link: http://example.com avatar: http://example.com/avatar.png desc: "这是一个描述" 添加多个友情链接,我们只需要根据上面的格式重复填写即可。 . 将 Name 改为友情链接的名字,例如 Cofess。 . http://example.com 为友情链接的地址。 . http://example.com/avatar.png 为友情链接的头像。 . 这是一个描述 为友情链接描述。 文章索引目录 123456title: 文章标题categories: - 文章分类tags: - 文章标签toc: true # 是否启用内容索引 sidebar侧边栏 文章侧边栏默认为开启状态,如果某篇文章不想开启侧边栏,在文章开头配置加入“sidebar: none”即可: 123456title: 文章标题categories: - 文章分类tags: - 文章标签sidebar: none # 是否启用sidebar侧边栏,none:不启用 博客优化 hexo-neat auto Minify html、js、css and make it neat 1npm install hexo-neat --save 在博客配置文件_config.yml中添加 12345678910111213141516# hexo-neatneat_enable: trueneat_html: enable: true exclude: neat_css: enable: true exclude: - '*.min.css'neat_js: enable: true mangle: true output: compress: exclude: - '*.min.js' hexo-baidu-url-submit 1npm install hexo-baidu-url-submit --save hexo-translate-title 使用Google翻译,百度翻译和有道翻译将Hexo中的汉字标题转成英文标题 安装 1npm install hexo-translate-title --save 在博客配置文件_config.yml中添加 123456translate_title: translate_way: google #google | baidu | youdao youdao_api_key: XXX youdao_keyfrom: XXX is_need_proxy: true #true | false proxy_url: http://localhost:8123 注意:判断是否需要配置google本地代理,因为我在本地是开启时才能访问google翻译的,如果没有被墙,请将_config.yml 下的is_need_proxy: true改为false。如果设置为true,请设置本地代理地址 数学公式 Hexo默认使用"hexo-renderer-marked"引擎渲染网页,该引擎会把一些特殊的markdown符号转换为相应的html标签 解决方案 解决方案有很多,可以网上搜下,为了节省大家的时间,这里只提供亲身测试过的方法。 更换Hexo的markdown渲染引擎,hexo-renderer-markdown-it-plus引擎替换默认的渲染引擎hexo-renderer-marked即可。 安装hexo-renderer-markdown-it-plus插件 12npm un hexo-renderer-marked --savenpm i hexo-renderer-markdown-it-plus --save 配置 安装插件后,如果未正常渲染LaTeX数学公式,在博客配置文件_config.yml中添加 12345678910111213141516markdown_it_plus: highlight: true html: true xhtmlOut: true breaks: true langPrefix: linkify: true typographer: quotes: “”‘’ plugins: - plugin: name: markdown-it-katex enable: true - plugin: name: markdown-it-mark enable: false 文章启用mathjax 12title: Hello Worldmathjax: true","categories":[{"name":"博客","slug":"博客","permalink":"http://devinshi2019.github.io/categories/%E5%8D%9A%E5%AE%A2/"}],"tags":[{"name":"Hexo系列","slug":"Hexo系列","permalink":"http://devinshi2019.github.io/tags/Hexo%E7%B3%BB%E5%88%97/"},{"name":"教程","slug":"教程","permalink":"http://devinshi2019.github.io/tags/%E6%95%99%E7%A8%8B/"}]},{"title":"Hexo博客系列-1:搭建GithubPages + Hexo博客","slug":"yuque/Hexo博客系列-1:搭建GithubPages + Hexo博客","date":"2019-11-25T16:15:20.000Z","updated":"2021-05-27T11:27:59.683Z","comments":true,"path":"2019/11/26/yuque/Hexo博客系列-1:搭建GithubPages + Hexo博客/","link":"","permalink":"http://devinshi2019.github.io/2019/11/26/yuque/Hexo%E5%8D%9A%E5%AE%A2%E7%B3%BB%E5%88%97-1%EF%BC%9A%E6%90%AD%E5%BB%BAGithubPages%20+%20Hexo%E5%8D%9A%E5%AE%A2/","excerpt":"前言:Hexo是一款基于Node.js的简单轻量静态博客框架,依赖少易于安装使用,可以方便的生成静态网页托管在GitHub和Coding上,是搭建博客的首选框架。","text":"前言:Hexo是一款基于Node.js的简单轻量静态博客框架,依赖少易于安装使用,可以方便的生成静态网页托管在GitHub和Coding上,是搭建博客的首选框架。 Hexo博客搭建 安装Git mac安装 1brew install git windows安装 git下载 安装完成后验证 1git --version 安装nodejs mac安装 1brew install node windows安装 nodejs地址,选择LTS版本 安装完成后验证 12node -v npm -v 安装hexo 安装hexo 1npm install -g hexo-cli 验证hexo 1hexo -v 创建Hexo博客项目 123hexo init myblogcd myblognpm install 完成后目录结构如下: node_modules: 依赖包 public:存放生成的页面 scaffolds:生成文章的一些模板 source:用来存放你的文章 themes:主题 _config.yml: 博客的配置文件 运行Hexo项目 12hexo ghexo server hexo的服务,在浏览器输入localhost:4000就可以看到你生成的博客了 配置GithubPages主页 注册github账户 首先,你先要有一个GitHub账户,去注册一个吧。注册完登录后,在GitHub.com中看到一个New repository,新建仓库[yourname].github.io点击create repository。 123456git config --global user.name \"yourname\"git config --global user.email \"youremail\"# 检查git config user.namegit config user.email 生成SSH 执行如下命令,一直回车即可 1ssh-keygen -t rsa -C \"youremail\" ssh,简单来讲,就是一个秘钥,其中,id_rsa是你这台电脑的私人秘钥,不能给别人看的,id_rsa.pub是公共秘钥,可以随便给别人看。把这个公钥放在GitHub上,这样当你链接GitHub自己的账户时,它就会根据公钥匹配你的私钥,当能够相互匹配时,才能够顺利的通过git上传你的文件到GitHub上。 上传公钥到GitHub 在mac中找到~/.ssh/id_rsa.pub 在GitHub的 Setting > SSH and GPG keys中,找到SSH keys的设置选项,点击New SSH key 把你的id_rsa.pub里面的信息复制进去。 验证SSH 1ssh -T git@github.com 部署hexo到GitHub 修改配置 修改_config.yml配置如下 1234deploy: type: git repo: git@github.com:YourgithubName/YourgithubName.github.io.git branch: master 安装插件 1npm install hexo-deployer-git --save 执行同步 123hexo cleanhexo generatehexo deploy 设置自己的域名 默认访问地址如下 [YourgithubName].github.io 配置GITHUB为私有域名 在如下配置页面设置私有域名为你自己购买的域名 如:blog.heidi.pub 设置CNAME 在域名后端将blog.heidi.pub 解析为 [YourgithubName].github.io","categories":[{"name":"博客","slug":"博客","permalink":"http://devinshi2019.github.io/categories/%E5%8D%9A%E5%AE%A2/"}],"tags":[{"name":"Hexo系列","slug":"Hexo系列","permalink":"http://devinshi2019.github.io/tags/Hexo%E7%B3%BB%E5%88%97/"},{"name":"教程","slug":"教程","permalink":"http://devinshi2019.github.io/tags/%E6%95%99%E7%A8%8B/"}]},{"title":"Hexo博客系列-2:增加coding发布源,绑定自己的域名,增加https访问","slug":"yuque/Hexo博客系列-2:增加coding发布源,绑定自己的域名,增加https访问","date":"2019-11-25T16:15:20.000Z","updated":"2021-05-27T11:27:59.683Z","comments":true,"path":"2019/11/26/yuque/Hexo博客系列-2:增加coding发布源,绑定自己的域名,增加https访问/","link":"","permalink":"http://devinshi2019.github.io/2019/11/26/yuque/Hexo%E5%8D%9A%E5%AE%A2%E7%B3%BB%E5%88%97-2%EF%BC%9A%E5%A2%9E%E5%8A%A0coding%E5%8F%91%E5%B8%83%E6%BA%90%EF%BC%8C%E7%BB%91%E5%AE%9A%E8%87%AA%E5%B7%B1%E7%9A%84%E5%9F%9F%E5%90%8D%EF%BC%8C%E5%A2%9E%E5%8A%A0https%E8%AE%BF%E9%97%AE/","excerpt":"前言:Hexo是一款基于Node.js的简单轻量静态博客框架,依赖少易于安装使用,可以方便的生成静态网页托管在GitHub和Coding上,是搭建博客的首选框架。","text":"前言:Hexo是一款基于Node.js的简单轻量静态博客框架,依赖少易于安装使用,可以方便的生成静态网页托管在GitHub和Coding上,是搭建博客的首选框架。 增加coding发布源 首先,去官网登陆你的coding账号,没有就注册一个,然后完善个人信息,。然后新建一个repository,项目名称就填你的用户名,选择私有,然后创建项目。 创建项目 项目地址格式是 你的域名.coding.me 选择静态页面服务 企业版界面如下 配置SSH公钥 同Github首先点击右上角的头像-个人设置-SSH公钥-新增公匙-输入你自己的SSH公匙-永久有效(推荐)-确定即可。如果你之前部署过github用同一个公匙是没问题的。 配置hexo的_config.yml 实例如下 1234567# Deployment## Docs: https://hexo.io/docs/deployment.htmldeploy: type: git repo: github: git@github.com:DevinShi2019/DevinShi2019.github.io.git,master coding: git@e.coding.net:sdf-system/blog-hexo.git,master 配置.travis/ssh_config 1234567891011121314Host github.com HostName github.com User git StrictHostKeyChecking no IdentityFile ~/.ssh/id_rsa IdentitiesOnly yes# 我这里使用的企业版,所以域名是e.coding.netHost e.coding.net HostName e.coding.net User git StrictHostKeyChecking no IdentityFile ~/.ssh/id_rsa IdentitiesOnly yes 发布 配置完之后,提交代码到master分支即可 绑定自己的域名并申请Https 域名CNAME配置 配置自由域名如 blog.sdf.heidi.pub CNAME 境外 devinshi2019.github.io blog.sdf.heidi.pub CNAME 默认 zfr5mu.coding-pages.com Github配置 如需要https,需要勾上此选项,等待大概1天左右 Coding配置 此处配置,并点击右侧操作的申请证书,完成之后如下 如需要https,需要先禁用掉blog.sdf.heidi.pub指向github的解析,等待1个小时左右生效后,再启用","categories":[{"name":"博客","slug":"博客","permalink":"http://devinshi2019.github.io/categories/%E5%8D%9A%E5%AE%A2/"}],"tags":[{"name":"Hexo系列","slug":"Hexo系列","permalink":"http://devinshi2019.github.io/tags/Hexo%E7%B3%BB%E5%88%97/"},{"name":"教程","slug":"教程","permalink":"http://devinshi2019.github.io/tags/%E6%95%99%E7%A8%8B/"}]}]}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。