1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

Fixed encoding problem when using blog plugin (#6103)

This commit is contained in:
Alexander Voss 2023-09-29 15:26:32 +02:00 committed by GitHub
parent cef79862a2
commit 1be39328ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -861,7 +861,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
# Create a file with the given content on disk
def _save_to_file(self, path: str, content: str):
os.makedirs(os.path.dirname(path), exist_ok = True)
with open(path, "w") as f:
with open(path, "w", encoding = "utf-8") as f:
f.write(content)
# -------------------------------------------------------------------------

View File

@ -861,7 +861,7 @@ class BlogPlugin(BasePlugin[BlogConfig]):
# Create a file with the given content on disk
def _save_to_file(self, path: str, content: str):
os.makedirs(os.path.dirname(path), exist_ok = True)
with open(path, "w") as f:
with open(path, "w", encoding = "utf-8") as f:
f.write(content)
# -------------------------------------------------------------------------