The value of knowledge lies not in possession, but in share.

0%

个人主页升级之双线部署 + 全站Https

关于Https

单线部署在Github Pages时,用的是cloudflare提供的SSL证书。

双线部署(GitHub Pages + Coding Pages)时,Cloudflare就不能用了,但Coding Pages提供了通过Let’s Encrypt申请SSL证书进而可以开启全站Https的方法。

Coding.net配置篇

注册Coding

BlogUpdate1

升级银牌会员

BlogUpdate2

创建项目

BlogUpdate3

配置SSH

BlogUpdate4

配置Pages

BlogUpdate5

  1. 添加CNAME记录为pages.coding.me,注意将Github的线路类型设置为国外

    BlogUpdate6

  2. 申请SSL证书

    注意:如果是Github+Coding双线部署,申请SSL证书前需要先将解析到github.io的CNAME记录暂停!!!不然Let’s Encrypt主机在验证域名所有权时会定位到Github Pages的主机上导致SSL证书申请失败

  3. 强制开启Https

_config文件配置篇

1
2
3
4
5
6
7
8
# Deployment # 非常重要的部署设置
## Docs: https://hexo.io/docs/deployment.html
deploy:
type: git
repository: # 可选择同时部署到 GitHub 和 coding 或者只部署到 Github
github: git@github.com:你的GitHub名/你的GitHub名.github.io.git
coding: git@git.coding.net:你的Coding名/你的Coding名.git
branch: master

🍭支持一根棒棒糖吧!