mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed encoding problem when using blog plugin (#6103)
This commit is contained in:
parent
cef79862a2
commit
1be39328ac
@ -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)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
@ -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)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user