aboutsummaryrefslogtreecommitdiff
path: root/pyblog
diff options
context:
space:
mode:
authorZhiming Wang <zmwangx@gmail.com>2015-09-05 14:02:33 +0800
committerZhiming Wang <zmwangx@gmail.com>2015-09-05 14:02:33 +0800
commit9b7e2e49ce2bb0812c3134defe9279e924f11e51 (patch)
treec10f9ce2c91b16c2b0196b183adf8cd467287bea /pyblog
parent207e955c251543a0042139e1d95c62cea67bf89b (diff)
downloadmy_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 '')
-rwxr-xr-xpyblog6
1 files changed, 4 insertions, 2 deletions
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":