Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why deploy had reset custom domain for github pages #2446

Closed
amlove2 opened this issue Mar 12, 2017 · 9 comments
Closed

why deploy had reset custom domain for github pages #2446

amlove2 opened this issue Mar 12, 2017 · 9 comments

Comments

@amlove2
Copy link

amlove2 commented Mar 12, 2017

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)

+-- hexo@3.2.2
+-- hexo-deployer-git@0.2.0
+-- hexo-generator-archive@0.1.4
+-- hexo-generator-category@0.1.3
+-- hexo-generator-index@0.2.0
+-- hexo-generator-tag@0.2.0
+-- hexo-renderer-ejs@0.2.0
+-- hexo-renderer-marked@0.2.11
+-- hexo-renderer-stylus@0.3.1
+-- hexo-server@0.2.0
`-- hexo-wordcount@2.0.1

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是不支持自定义域名的,请问这个如何破
@NoahDragon
Copy link
Member

Have you put the CNAME file in hexo source folder?

@liaocyintl-deprecated
Copy link

NoahDragon is right.

@hekate2639
Copy link

deploy 下面加一行:
delete: false

@mcarpenterjr
Copy link

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

@victorchen276
Copy link

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

no, it won't delete it.

@Ray-Eldath
Copy link

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

@krisnaxda
Copy link

Have you put the CNAME file in hexo source folder?

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

@liaocyintl-deprecated
Copy link

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

@krisnaxda
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants