From 9b7e2e49ce2bb0812c3134defe9279e924f11e51 Mon Sep 17 00:00:00 2001 From: Zhiming Wang <zmwangx@gmail.com> Date: Sat, 5 Sep 2015 14:02:33 +0800 Subject: Self host webfonts Sometimes (e.g., occasionally in China) Google/FontAwesome webfonts might not be available, rendering the whole site unusable. --- pyblog | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'pyblog') diff --git a/pyblog b/pyblog index 7857fd62..e717caf0 100755 --- a/pyblog +++ b/pyblog @@ -722,7 +722,8 @@ def generate_blog(fresh=False, report_total_errors=True): if name.startswith('.'): continue extension = name.split(".")[-1] - if extension not in ["css", "jpg", "md", "png", "svg", "ico", "txt"]: + if extension not in ["css", "jpg", "md", "png", "svg", "ico", "txt", + "eot", "ttf", "woff", "woff2"]: continue relpath = os.path.join(relroot, name) @@ -738,7 +739,8 @@ def generate_blog(fresh=False, report_total_errors=True): anything_modified = True if srcpath == INDEXMD: continue # index will be processed separately - if extension in ["css", "jpg", "png", "svg", "ico", "txt"]: + if extension in ["css", "jpg", "png", "svg", "ico", "txt", + "eot", "ttf", "woff", "woff2"]: sys.stderr.write("copying %s\n" % relpath) shutil.copy(srcpath, dstpath) elif extension == "md": -- cgit v1.2.1