Mkdocs: gh-deploy removes "Custom domain" configuration

Created on 19 Jul 2017  路  2Comments  路  Source: mkdocs/mkdocs

When the GitHub Pages has a Custom domain configured, and you run
mkdocs gh-deploy,
the "Custom domain" is removed

Most helpful comment

As a reminder, the documentation states regarding gh-deploy:

You should never edit files in your gh-pages branch by hand if you're using the gh-deploy command because you will lose your work.

That behavior is determined by the underlying third-party tool we use (and how it interacts with Git), so there's not any reasonable way to change that behavior.

However, if you include the CNAME file (required by GitHub for custom domains) in your docs_dir, then MkDocs will copy it to the site_dir. In fact, this is what MkDocs does for its own documentation.

All 2 comments

As a reminder, the documentation states regarding gh-deploy:

You should never edit files in your gh-pages branch by hand if you're using the gh-deploy command because you will lose your work.

That behavior is determined by the underlying third-party tool we use (and how it interacts with Git), so there's not any reasonable way to change that behavior.

However, if you include the CNAME file (required by GitHub for custom domains) in your docs_dir, then MkDocs will copy it to the site_dir. In fact, this is what MkDocs does for its own documentation.

Thanks @waylan!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rei-vilo picture rei-vilo  路  5Comments

Kristinita picture Kristinita  路  3Comments

nodesocket picture nodesocket  路  6Comments

mikemadeja picture mikemadeja  路  6Comments

pixelbrackets picture pixelbrackets  路  5Comments