hexo icon indicating copy to clipboard operation
hexo copied to clipboard

why deploy had reset custom domain for github pages

Open amlove2 opened this issue 9 years ago • 9 comments

Environment Info

Node version(node -v)

v6.10.0

Your site _config.yml

# Hexo Configuration
## Docs: https://hexo.io/docs/configuration.html
## Source: https://github.com/hexojs/hexo/

# Site
title: 牵猪的仓鼠
subtitle:
description:
author: amlove2
language:
timezone:

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
url: http://s.amlove.cn
root: /
permalink: :year/:month/:day/:title/
permalink_defaults:

# Directory
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# Writing
new_post_name: :title.md # File name of new posts
default_layout: post
titlecase: false # Transform title into titlecase
external_link: true # Open external links in new tab
filename_case: 0
render_drafts: false
post_asset_folder: false
relative_link: false
future: true
highlight:
  enable: false #关闭hexo渲染高亮,使用主题代码块高亮
  line_number: true
  auto_detect: false
  tab_replace:

# Category & Tag
default_category: uncategorized
category_map:
tag_map:

# Date / Time format
## Hexo uses Moment.js to parse and display date
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss

# Pagination
## Set per_page to 0 to disable pagination
per_page: 10
pagination_dir: page

# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: 3-hexo

# Deployment
## Docs: https://hexo.io/docs/deployment.html
deploy: 
  type: git
  repo: https://github.com/amlove-cn/amlove-cn.github.io.git
  branch: master

...

Your theme _config.yml

# Hexo Configuration
...

Plugin version(npm ls --depth 0)

+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
+-- [email protected]
`-- [email protected]

For BUG

when i was execute cmd ` hexo deploy`, my custom domain for github page has reset.I don't know why it.I read github doc , After each command, the  `repo.pages_https_redirect_disabled`  had  be called.please tell me how to solve it.

My question is exactly the same it

我遇到一个问题,执行 hexo deploy 之后,自定义的域名就会被清除掉,必须手动在github 上重新配置一下,不知道为什么. 貌似是触发了 repo.pages_https_redirect_disabled, 因为启用了https 的github page是不支持自定义域名的,请问这个如何破

amlove2 avatar Mar 12 '17 08:03 amlove2

Have you put the CNAME file in hexo source folder?

NoahDragon avatar Mar 29 '17 17:03 NoahDragon

NoahDragon is right.

liaocyintl-deprecated avatar Jun 27 '17 14:06 liaocyintl-deprecated

deploy 下面加一行: delete: false

hekate2639 avatar Jul 08 '17 16:07 hekate2639

Hey so will hexo clean delete the CNAME file from the source folder?

mcarpenterjr avatar Dec 09 '17 23:12 mcarpenterjr

Hey so will hexo clean delete the CNAME file from the source folder?

no, it won't delete it.

victorchen276 avatar Aug 16 '19 13:08 victorchen276

append following line to your script in .travis.yml after the hexo generate works for me:

script:
  - hexo generate # generate static files
  - echo "ray-eldath.me" > public/CNAME

Ray-Eldath avatar Jun 17 '20 18:06 Ray-Eldath

Have you put the CNAME file in hexo source folder?

how to put CNAME in hexo source folder? i am clueless

krisnaxda avatar Jun 18 '20 05:06 krisnaxda

Have you put the CNAME file in hexo source folder?

how to put CNAME in hexo source folder? i am clueless

You just create a file named CNAME under the 'source' folder. like this image

the content of CNAME is your domains: image

liaocyintl-deprecated avatar Jun 18 '20 06:06 liaocyintl-deprecated

Have you put the CNAME file in hexo source folder?

how to put CNAME in hexo source folder? i am clueless

You just create a file named CNAME under the 'source' folder. like this image

the content of CNAME is your domains: image

thank you sir

krisnaxda avatar Jun 18 '20 06:06 krisnaxda