From 12da6273e5881fab35a8451b5b78206c7813203d Mon Sep 17 00:00:00 2001 From: Changkun Ou Date: Thu, 3 May 2018 14:07:46 +0200 Subject: [PATCH] fix: encoding & footer --- website/filter.py | 4 ++-- website/themes/moderncpp/layout/index.ejs | 2 +- website/themes/moderncpp/layout/page.ejs | 2 +- website/themes/moderncpp/layout/partials/main_menu.ejs | 4 ++++ 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/website/filter.py b/website/filter.py index 37bd371..54b9b05 100644 --- a/website/filter.py +++ b/website/filter.py @@ -20,8 +20,8 @@ for index, source in enumerate(source_dir): os.makedirs(dst_filepath) print(dst_filepath) print(dst_filepath + '/index.md') - with open(source+chapter, 'r') as source_file: - with open(dst_filepath + '/index.md', 'w') as output_file: + with open(source+chapter, 'r', encoding='utf-8') as source_file: + with open(dst_filepath + '/index.md', 'w', encoding='utf-8') as output_file: for line in source_file: if any(keyword in line for keyword in ignores): continue diff --git a/website/themes/moderncpp/layout/index.ejs b/website/themes/moderncpp/layout/index.ejs index 6b16dda..71881e4 100755 --- a/website/themes/moderncpp/layout/index.ejs +++ b/website/themes/moderncpp/layout/index.ejs @@ -25,7 +25,7 @@ diff --git a/website/themes/moderncpp/layout/page.ejs b/website/themes/moderncpp/layout/page.ejs index 7a6451c..04bc262 100755 --- a/website/themes/moderncpp/layout/page.ejs +++ b/website/themes/moderncpp/layout/page.ejs @@ -19,7 +19,7 @@ diff --git a/website/themes/moderncpp/layout/partials/main_menu.ejs b/website/themes/moderncpp/layout/partials/main_menu.ejs index af19fed..a6b2f5a 100755 --- a/website/themes/moderncpp/layout/partials/main_menu.ejs +++ b/website/themes/moderncpp/layout/partials/main_menu.ejs @@ -20,6 +20,10 @@ + +