Support for manifest.json

This commit is contained in:
Fabio Manganiello 2022-06-14 02:24:36 +02:00
parent 8f1ef87623
commit afac99ca37
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 0.2.1
- Support for serving a `manifest.json`.
## 0.2.0
- If `img` and `markdown` aren't present under `content_dir` then treat

View File

@ -43,6 +43,11 @@ def fonts_route(file: str):
return send_from_directory(app.fonts_dir, file, config.default_fonts_dir)
@app.route('/manifest.json', methods=['GET'])
def manifest_route():
return send_from_directory(config.content_dir, 'manifest.json')
@app.route('/article/<path:path>/<article>', methods=['GET'])
def article_with_path_route(path: str, article: str):
return app.get_page(os.path.join(path, article))