简体   繁体   English

如何从 Github 页面中托管的自定义域中删除存储库名称?

[英]How to remove repository name from a custom domain hosted in Github Pages?

I have made a NameCheap domain and linked it to GitHub pages properly.我创建了一个 NameCheap 域并将其正确链接到 GitHub 页。 If the site is live at a.me/resume, how can I make it just a.me and remove the repository's name from the url?如果该站点位于 a.me/resume,我怎样才能将其设为 a.me 并从 url 中删除存储库的名称?

在此处输入图像描述

Open the repository and go to settings - pages - scroll down to the custom domain section and enter your custom domain and click save.打开存储库和 go 到设置 - 页面 - 向下滚动到自定义域部分并输入您的自定义域并单击保存。 You'll want to delete the old CNAME because when you save the custom domain it should create a new CNAME automatically.您需要删除旧的 CNAME,因为当您保存自定义域时,它会自动创建一个新的 CNAME。

I would also recommend verifying the custom domain you want to use with GitHub if you haven't already done so as a preventative measure to discourage domain squatters from using it.我还建议您验证要使用 GitHub 的自定义域(如果您尚未这样做)作为阻止域抢注者使用它的预防措施。 For that you'll just need to go to your account settings - pages - add a domain.为此,您只需要 go 到您的帐户设置 - 页面 - 添加域。

In order to verify the custom domain with GitHub, you'll need to add the verification code they give you to your DNS configuration as a TXT file.为了使用 GitHub 验证自定义域,您需要将他们提供给您的验证码作为 TXT 文件添加到您的 DNS 配置中。

https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM