diff options
author | Zhiming Wang <zmwangx@gmail.com> | 2015-09-05 14:02:33 +0800 |
---|---|---|
committer | Zhiming Wang <zmwangx@gmail.com> | 2015-09-05 14:02:33 +0800 |
commit | 9b7e2e49ce2bb0812c3134defe9279e924f11e51 (patch) | |
tree | c10f9ce2c91b16c2b0196b183adf8cd467287bea /pyblog | |
parent | 207e955c251543a0042139e1d95c62cea67bf89b (diff) | |
download | my_new_personal_website-9b7e2e49ce2bb0812c3134defe9279e924f11e51.tar.xz my_new_personal_website-9b7e2e49ce2bb0812c3134defe9279e924f11e51.zip |
Self host webfonts
Sometimes (e.g., occasionally in China) Google/FontAwesome webfonts
might not be available, rendering the whole site unusable.
Diffstat (limited to 'pyblog')
-rwxr-xr-x | pyblog | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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": |