From 521ad0f4949dab8349a8f04446333a86a2439dfc Mon Sep 17 00:00:00 2001 From: HeisenBerg? Date: Sat, 27 Jul 2024 05:05:05 +0800 Subject: [PATCH] Update main.py --- main.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 3e9b6eb1..1db4c8e6 100644 --- a/main.py +++ b/main.py @@ -631,12 +631,14 @@ def run(env: str = "development", power: int = 16): template_ = booster.overload_tasks() # Replace project README file. - if env == "production": - with open(SERVER_PATH_README, "w", encoding="utf8") as f: - for i in template_: - f.write(i) - - shutil.copyfile(SERVER_PATH_README, os.path.join(SERVER_PATH_DOCS, "index.md")) + if render_style=='mkdocs': + + if env == "production": + with open(SERVER_PATH_README, "w", encoding="utf8") as f: + for i in template_: + f.write(i) + + shutil.copyfile(SERVER_PATH_README, os.path.join(SERVER_PATH_DOCS, "index.md")) if __name__ == "__main__":