diff options
Diffstat (limited to '')
-rwxr-xr-x | pyblog | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -39,7 +39,8 @@ import lxml.etree as ET ############################# BLOG CONFIGURATIONS ############################## # Safe to customize -BLOG_HOME = "http://zmwangx.github.io/" +BLOG_HOME = "http://zhimingwang.org/" +CUSTOM_DOMAIN = "zhimingwang.org" # GitHub Pages custom domain (could be None) BLOG_TITLE = "dl? cmplnts?" BLOG_DESCRIPTION = "Zhiming Wang's personal blog" LANGUAGE = "en-us" @@ -751,6 +752,10 @@ def generate_blog(fresh=False, report_total_errors=True): with open(os.path.join(BUILDDIR, ".nojekyll"), "w") as fileobj: pass + if CUSTOM_DOMAIN and not os.path.exists(os.path.join(BUILDDIR, "CNAME")): + with open(os.path.join(BUILDDIR, "CNAME"), "w") as fileobj: + fileobj.write(CUSTOM_DOMAIN) + failed_builds = 0 generator_mtime = os.path.getmtime(GENERATORSOURCE) template_mtime = os.path.getmtime(HTMLTEMPLATE) |