Github Pages 如何为每个存储库添加子域?

How does Github Pages add a subdomain for each repository?

对于像 https://github.com/user/repository 这样的每个 github 存储库,都有一个相应的 github 页面子域 repository.github.io,并且 github 只是在 [= 下创建这些子域13=] 即时。

有人知道 github 是怎么做到的吗?我希望有一个易于使用的 DNS 服务器/DNS 服务,它也支持 REST。

我的猜测是 GitHub 只是使用从 *.github.io 映射到某个内部 GitHub 服务器的 wildcard subdomain,然后根据要求 URL.

我不知道你想用 GitHub 的 DNS 服务器做什么,但你可以通过 GitHub API 创建一个 repo:How to create repository in github through github API?