Skip to content

Commit 0c56bb3

Browse files
committed
fix tip-cname
1 parent 437e302 commit 0c56bb3

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

cname-file.md

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,49 @@
11
# 添加一个 CNAME 文件到你的存储库中
22

3-
如果你正在使用一个[自定义域](https://help.github.com/articles/about-custom-domains-for-github-pages-sites)去重定向你的 GitHub 页面站点,你必须创建和提交一个包含自定义域的 *CNAME* 文件到你的 GitHub 页面存储库中
4-
5-
1. 在 GitHub ,导航到你的页面存储库。
6-
2. 在“分支”菜单中,切换到你存储库的[页面分支](https://help.github.com/articles/user-organization-and-project-pages)
7-
- 对于用户和组织的页面站点来说,页面分支是 `master` 。
8-
- 对于项目页面站点来说,页面分支是 `gh-pages` 。
9-
3. 添加一个新文件,命名为 *CNAME* (全部大写!),放页面分支的根目录下
10-
4. 在新文件中,添加一行,指定自定义域的空子域。例如,使用 `blog.example.com` 而不是 `https://blog.example.com` 。请注意,在 *CNAME* 文件中只允许有**一个域**
3+
如果你正在使用一个[自定义域名](custom-domains.md)去重定向你的 GitHub Pages,你必须创建和提交一个包含自定义域名的 *CNAME* 文件到你的 GitHub Pages 存储库中
4+
5+
1. 在 GitHub,导航到你的页面存储库。
6+
2. 在“分支”菜单中,切换到你存储库的[Pages 分支](https://help.github.com/articles/user-organization-and-project-pages)
7+
- 对于用户和组织的页面站点来说,Pages 分支是 `master` 。
8+
- 对于项目页面站点来说,Pages 分支是 `gh-pages` 。
9+
3. 添加一个新文件,命名为 *CNAME* (全部大写!),放在 Pages 分支的根目录下
10+
4. 在新文件中,添加一行,指定自定义域名的空子域。例如,使用 `blog.example.com` 而不是 `https://blog.example.com` 。请注意,在 *CNAME* 文件中只允许有**一个域名**
1111
5. 输入提交的消息,或接受默认消息。
12-
6. 在提交消息的对话框底部,点击**确认合并**
12+
6. 在提交消息的对话框底部,点击 **Confirm merge**
1313

14-
## 确认自定义域配置正确
14+
## 确认自定义域名配置正确
1515

1616
1. 在你的存储库右边侧边栏,点击![](images/cnamefile1.png).
1717

18-
![](images/cnamefile2.png)
1918

20-
2. 在“ GitHub Pages ”底部,你会看到你的 *CNAME* 文件的自定义域。
19+
20+
2. 在“ GitHub Pages ”底部,你会看到你的 *CNAME* 文件的自定义域名。
2121

2222
![](images/cnamefile3.png)
2323

24-
## 下一步:配置域名服务器的设置项
24+
## 下一步:配置 DNS 的设置项
2525

26-
在你已经创建和提交你的 *CNAME* 文件到 GitHub 之后,在你的域名服务器提供者上做以下项之一
26+
在你已经创建和提交你的 *CNAME* 文件到 GitHub 之后,在你的 DNS 提供者上做以下项之一
2727

2828
- 如果你的自定义域是一个[子域](https://help.github.com/articles/about-custom-domains-for-github-pages-sites#subdomains)(推荐),[配置一个 `CNAME` 记录](https://help.github.com/articles/tips-for-configuring-a-cname-record-with-your-dns-provider)
29-
- 如果你的自定义域是一个[顶点域](https://help.github.com/articles/about-custom-domains-for-github-pages-sites#apex-domains)[配置一个 `ALIAS` , `ANAME` ,或者 `A` 记录](https://help.github.com/articles/tips-for-configuring-an-a-record-with-your-dns-provider)
29+
- 如果你的自定义域是一个[顶端域](https://help.github.com/articles/about-custom-domains-for-github-pages-sites#apex-domains)[配置一个 `ALIAS` , `ANAME` ,或者 `A` 记录](https://help.github.com/articles/tips-for-configuring-an-a-record-with-your-dns-provider)
3030

31-
## 现实世界关于 *CNAME* 文件的例子
31+
## 真实的 *CNAME* 文件例子
3232

33-
[**atmos.github.io repository**](https://github.com/atmos/atmos.github.io/)有一个域名为 `www.atmos.org`[*CNAME* 文件](https://github.com/atmos/atmos.github.io/blob/master/CNAME)
33+
[**atmos.github.io repository**](https://github.com/atmos/atmos.github.io/) 有一个域名为 `www.atmos.org`[*CNAME* 文件](https://github.com/atmos/atmos.github.io/blob/master/CNAME)
3434

35-
- 用户页面站点 [atmos.github.io](http://atmos.github.io/) 定向到 [www.atmos.org](http://www.atmos.org/)
36-
- 项目页面站点 [atmos.github.io/warden-github](http://atmos.github.io/warden-github/) 定向到 [www.atmos.org](http://www.atmos.org/warden-github/)
35+
- 用户 Pages 站点 [atmos.github.io](http://atmos.github.io/) 定向到 [www.atmos.org](http://www.atmos.org/)
36+
- 项目 Pages 站点 [atmos.github.io/warden-github](http://atmos.github.io/warden-github/) 定向到 [www.atmos.org](http://www.atmos.org/warden-github/)
3737

38-
注意项目页面站点如何继承其所有者的用户页面站点的域
38+
注意项目 Pages 站点如何继承其所有者的用户 Pages 站点的域
3939

40-
[**emoji repository**](https://github.com/muan/emoji/)有一个域名为 `emoji.muan.co`[*CNAME* 文件](https://github.com/muan/emoji/blob/gh-pages/CNAME)。它归 [**muan**](https://github.com/muan/) 所有,muan 的[用户页面存储库](http://github.com/muan/muan.github.com)有一个域名为 `muan.co`[*CNAME* 文件](https://github.com/muan/muan.github.com/blob/master/CNAME)
40+
[**emoji repository**](https://github.com/muan/emoji/)有一个域名为 `emoji.muan.co`[*CNAME* 文件](https://github.com/muan/emoji/blob/gh-pages/CNAME)。它归 [**muan**](https://github.com/muan/) 所有,muan 的[用户 Pages 存储库](http://github.com/muan/muan.github.com)有一个域名为 `muan.co`[*CNAME* 文件](https://github.com/muan/muan.github.com/blob/master/CNAME)
4141

42-
- 项目页面站点 [muan.github.io/emoji](http://muan.github.io/emoji/) 定向到 [muan.co/emoji](http://www.atmos.org/warden-github/),这对于 [emoji.muan.co](http://emoji.muan.co/) 也同样适用。
42+
- 项目 Pages 站点 [muan.github.io/emoji](http://muan.github.io/emoji/) 定向到 [muan.co/emoji](http://www.atmos.org/warden-github/),这对于 [emoji.muan.co](http://emoji.muan.co/) 也同样适用。
4343

4444
## 进一步了解
4545

46-
-[在 GitHub 页面上设置一个自定义域](https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages)
46+
-[在 GitHub 页面上设置一个自定义域](set-custom-domains.md)
4747

4848

4949

tip-cname.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# 在域名服务器提供者上配置 CNAME 记录的技巧
1+
# 在 DNS 提供者上配置 CNAME 记录的技巧
22

3-
[设置一个自定义子域](https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/),你必须要在你的域名服务器提供者上配置一个 `CNAME` 记录,这可能会或可能不会和你的网络主机提供者相同。
3+
[设置一个自定义子域](set-custom-domains.md),你必须要在你的 DNS 提供者上配置一个 `CNAME` 记录,这可能会或可能不会和你的网络主机提供者相同。
44

5-
要获取更多自定义子域的信息,可详见“[关于 GitHub 网页站点的自定义域.](https://help.github.com/articles/about-custom-domains-for-github-pages-sites#subdomains)
5+
要获取更多自定义子域的信息,可详见“[关于 GitHub 网页站点的自定义域.](custom-domains.md)”。
66

7-
提示:你可以仅仅只为 GitHub 的网页站点配置一个自定义域或者一个自定义顶点域[除非你使用了一个 `www` 的子域](https://help.github.com/articles/tips-for-configuring-a-cname-record-with-your-dns-provider/#configuring-a-www-subdomain)
7+
提示:你可以仅仅只为 GitHub Pages 配置一个自定义域名或者一个自定义顶端域名[除非你使用了一个 `www` 的子域](tip-cname.md)
88

9-
## 在域名服务器提供者上配置自定义子域
9+
## 在 DNS 提供者上配置自定义子域名
1010

11-
与你的域名服务器提供者一起,创建一个 CNAME 记录指的是从该域到 `username.github.io` 。域名服务器的变化会占用一整天去扩散蔓延
11+
与你的 DNS 提供者一起,创建一个 CNAME 记录指的是从该域到 `username.github.io`。DNS 的变化会占用一整天去扩散蔓延
1212

13-
不要在 GitHub 页面中使用通配符域名服务器记录(例如 `*.example.com` )!一个通配符域名服务器记录可以让任何人在其中一个子域中登录到 GitHub 页面站点
13+
不要在 GitHub Pages 中使用通配符 DNS 记录(例如 `*.example.com` )!一个通配符 DNS 记录可以让任何人在其中一个子域中登录到 GitHub Pages
1414

1515
为确保你的 CNAME 记录设置正确,使用 [dig](http://linux.die.net/man/1/dig) 命令:
1616

@@ -24,16 +24,16 @@ github.map.fastly.net. 22 IN A 199.27.76.133
2424

2525
## 配置一个 `www` 子域
2626

27-
如果你配置一个[顶点域](https://help.github.com/articles/about-custom-domains-for-github-pages-sites#apex-domains)(例如 `example.com` )和一个匹配的 `www` 子域(例如 `www.example.com` ), GitHub 服务器会自动地创建两重定向
27+
如果你配置一个[顶端域名](custom-domains.md)(例如 `example.com` )和一个匹配的 `www` 子域(例如 `www.example.com` ),GitHub 服务器会自动地创建双重定向
2828

2929
例如:
3030

31-
- 如果你的 `CNAME` 文件包含 `example.com` ,那么 `www.example.com` 会定向到 `example.com`
32-
- 如果你的 `CNAME` 文件包含 `www.example.com` ,那么 `example.com` 会定向到 `www.example.com`
31+
- 如果你的 `CNAME` 文件包含 `example.com`,那么 `www.example.com` 会定向到 `example.com`
32+
- 如果你的 `CNAME` 文件包含 `www.example.com`,那么 `example.com` 会定向到 `www.example.com`
3333

34-
你可以使用除了 `www` 以外的一个自定义子域和一个自定义顶点域来通过域名重定向(有时候也叫“域名转发”)。但是,请注意,这只能用于用户和组织的页面,而不是项目的页面
34+
你可以使用除了 `www` 以外的一个自定义子域名和一个自定义顶端域名来通过域名重定向(有时候也叫“域名转发”)。但是,请注意,这只能用于用户和组织的 Pages,而不是项目的 Pages
3535

3636
# 进一步了解
3737

38-
-[在 GitHub 页面上设置一个自定义域](https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages)
38+
-[在 GitHub 页面上设置一个自定义域](set-custom-domains.md)”。
3939

0 commit comments

Comments
 (0)