如何在Github页面上设置两个具有相同域的jekyll博客(CNAME) [英] How to set up two jekyll blogs on Github Pages with the same domain (CNAME)

查看:869
本文介绍了如何在Github页面上设置两个具有相同域的jekyll博客(CNAME)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Github Pages上有两个博客:旅行 personal 。第一个应该出现在 http://alkamid.com/travel ,第二个 http://alkamid.com - 他们会这样做,但是在推出与个人内容相同内容的旅行CNAME后(只需一行: alkamid.com ),我从Github得到以下警告:


页面构建成功完成,但返回了以下
警告:



已采用CNAME:alkamid.com

我没有在我的域名提供商的设置中更改任何内容。



为这两个博客配置CNAME的正确方法是什么? / travel 中删除​​ CNAME code>存储库。您只需在 username.github.io 存储库中使用它。


$ b 编辑:这是我关于 github页面( ghp )的 CNAME ghp 上管理自定义域的最简单方法是设置一个 CNAME (指向 example.com )位于 username.github.io 以及任何项目托管 gh-pages 分支的存储库可以自然地在 example.com/repositoryName 处进行访问。这是我的解决方案。



但是您可以随时在特定项目存储库上设置另一个 CNAME sub1.example.com )或另一个域( example.org )。这只是意味着设置一个自定义的DNS。这是你的选择。

I have two blogs hosted on Github Pages: travel and personal. The first should appear on http://alkamid.com/travel, the second on http://alkamid.com — and they do, but after pushing the travel CNAME with the same content as the personal one (just one line: alkamid.com), I got the following warning from Github:

The page build completed successfully, but returned the following warning:

CNAME already taken: alkamid.com

I didn't change anything in the settings of my domain provider.

What is the correct way of configuring CNAME for these two blogs?

解决方案

Remove CNAME from your /travel repository. You just need it in your username.github.io repository.

Edit : This is my point of view about CNAME on github pages (ghp)

The simplest ways to manage custom domain on ghp is to set a CNAME (pointing to example.com) on username.github.io and any project repository hosting a gh-pages branch can be naturally reached at example.com/repositoryName. This is my solution.

But you can always set another CNAME on a particular project repository, for a subdomain (sub1.example.com) or another domain (example.org). This just implies to set a custom DNS. And here it's your choice.

这篇关于如何在Github页面上设置两个具有相同域的jekyll博客(CNAME)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆