如何使用Jekyll与我的域,但托管在GitHub? [英] How can I use Jekyll with my domain, but hosted on GitHub?
问题描述
我想从WordPress切换到Jekyll。我已经迁移了这些文章(见新的Jekyll文章+渲染页面和旧的WordPress网站)。
现在我想要使用旧的URL:
旧网址:http://martin-thoma.com/word-error-rate-calculation/
目前的新网址:http: //martinthoma.github.io/word-error-rate-calculation/
所以这个问题真的只关于顶级域名。我的提供商(称为Knallhart)只应该保持域 martin-thoma.com
(GitHub不提供这个,是吗?)和GitHub应该提供内容
当用户输入 http://martin-thoma.com/word-error-rate-calculation/
或 http://martinthoma.github.io/word-error-rate-calculation/
浏览器应显示 http:// martin-thoma .com / word-error-rate-calculation /
,虽然内容是在GitHub。
我知道GitHub页面使用Pages设置自定义域,但我仍然不明白我应该
我已经尝试将内容 martin-thoma.com
添加到我的GitHub信息库中,但这只会导致从 martinthoma.github.io
到 martin-thoma.com
的重定向。我刚刚尝试在Knallhart提供的网络空间中添加内容 martinthoma.github.io
的CNAME。这似乎没有效果。
我想我必须在GitHub和Knallhart上改变一些东西。 GitHub必须知道它应该显示 martin-thoma.com
,Knallhart必须重定向到内容。但我不明白如何做到这一点。
我可以通过我自己的方式来做这件事吗?还是需要Knallhart的支持?我目前有一个相当便宜的计划,基本上只提供托管+ PHP + MySQL。如果我支付6欧元,我得到一个Zone-Modul(其中描述DNS控制您的域)。 我需要一个Zone-Modul吗?
由于帮助页面说:
< blockquote>
对于像example.com这样的域,您应该使用指向204.232.175.78的A记录:
在您的情况下,您需要为 martin-thoma.com
创建 A
记录,将我的示例(我不使用Knallhart,也许它是不同的,只是确保你做一个 A
记录到$ code> 204.232.175.78 ,Github提供):
主机|记录类型|主机/ IP
* .kjuly.com A 204.232.175.78(编辑:不推荐)
@ .kjuly.com A 204.232.175.78
注意: CNAME
记录是为 dev等子域而设。 martin-thoma.com
。
编辑(重要):
根据Github的官方博客文章 GitHub Pages Legacy IP Deprecation, 204.232.175.78
已被弃用,您应该使用 192.30.252.153
或 192.30.252.154
。
主机|记录类型|主机/ IP
@ .kjuly.com A 192.30.252.153
I would like to switch from WordPress to Jekyll. I already have migrated the articles (see new Jekyll articles + rendered page and old WordPress site).
Now I would like to have the old URLs:
Old URL : http://martin-thoma.com/word-error-rate-calculation/
Current new URL: http://martinthoma.github.io/word-error-rate-calculation/
So this question is really only about the top level domain. My provider (called "Knallhart") should only "hold" the domain martin-thoma.com
(GitHub does not offer this, do they?) and GitHub should serve the content.
When a user enters http://martin-thoma.com/word-error-rate-calculation/
or http://martinthoma.github.io/word-error-rate-calculation/
the browser should show http://martin-thoma.com/word-error-rate-calculation/
, although the content is at GitHub.
I know the GitHub page Setting up a custom domain with Pages, but I still don't understand what I should do.
I've tried adding a CNAME file with content martin-thoma.com
to my GitHub repository, but this only lead to an redirect from martinthoma.github.io
to martin-thoma.com
. I've just tried adding a CNAME with content martinthoma.github.io
on the webspace provided by Knallhart. This seems to have no effect.
I think I have to change something on GitHub as well as with Knallhart. GitHub has to know that it should display martin-thoma.com
and Knallhart has to redirect to the content. But I don't understand how to do this. What do I have to change on GitHub and what do I have to do on side of my provider?
Can I do this by my own or do I need support from Knallhart? I currently have a quite cheap plan that basically only offers Hosting+PHP+MySQL. If I pay 6€ more, I get a Zone-Modul (which has the description "DNS controll for your domain"). Do I need a Zone-Modul?
As the HELP PAGE said:
For a domain like example.com, you should use an A record pointing to 204.232.175.78:
In your case, you need to create an A
record for martin-thoma.com
, take mine as an example (I don't use Knallhart, maybe it's different, just make sure you make a A
record to 204.232.175.78
, which Github offers):
Host |record type | host/IP
*.kjuly.com A 204.232.175.78 (Edit: NOT Recommended)
@.kjuly.com A 204.232.175.78
Note: CNAME
record is for subdomains like dev.martin-thoma.com
.
EDIT (IMPORTANT):
Depend on the Github's official blog post "GitHub Pages Legacy IP Deprecation", the 204.232.175.78
is deprecated, you should use 192.30.252.153
or 192.30.252.154
instead.
Host |record type | host/IP
@.kjuly.com A 192.30.252.153
这篇关于如何使用Jekyll与我的域,但托管在GitHub?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!