V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
BlackSnow
V2EX  ›  GitHub

请问一下 github page 如何固定自定义域名

  •  
  •   BlackSnow · 4 天前 · 452 次点击

    我使用的方案是 hexo + GitHub page 同步到自己的域名

    每次 hexo deploy 之后 都需要手动在page setting 页面添加一次 my domain

    这个有没有固定或者用通过脚本写入 action 中?

    5 条回复    2024-10-09 10:18:30 +08:00
    shuxhan
        2
    shuxhan  
       4 天前
    在本地的根目录下添加一个文件 `CNAME `,里面写上自定义的域名,如:`xxx.github.io`,一起上传
    makizhang
        3
    makizhang  
       4 天前 via Android
    都能用 github pages 为啥不直接上 cf pages 就不用管域名的事了啊
    deplives
        4
    deplives  
       4 天前
    在 source 目录下增加一个文本文件
    CNAME

    里面写上你的域名
    然后在仓库配置里面也写上这个域名就行了
    BlackSnow
        5
    BlackSnow  
    OP
       3 天前
    @lambdaq 感谢,好用
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2454 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 15:30 · PVG 23:30 · LAX 08:30 · JFK 11:30
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.