Add WebManifest, base social metadata, noindex on non-pages; Add /api/items and adapt storing to support it; Improve auth handling and add session verification; Fix #11; Improve editing page with image paste from clipboard and file upload preview; Add footer; Autogenerate config

This commit is contained in:
2025-07-14 22:52:22 +02:00
parent 0a8f5269e4
commit 3b1dcec778
9 changed files with 262 additions and 104 deletions

11
_util.py Normal file
View File

@ -0,0 +1,11 @@
def read_textual(filepath:str) -> str:
try:
with open(filepath, "r", encoding="utf-8") as f:
return f.read()
except UnicodeDecodeError:
with open(filepath, "r") as f:
return f.read()
def write_textual(filepath:str, content:str):
with open(filepath, "w", encoding="utf-8") as f:
return f.write(content)