udpdated vier and checked some documentation

This commit is contained in:
ske087
2025-12-01 23:48:09 +02:00
parent f710c85102
commit 5905c693e6
9 changed files with 653 additions and 78 deletions

View File

@@ -3976,19 +3976,18 @@ def api_daily_mirror_history_data():
# Help/Documentation Routes
@bp.route('/help')
@bp.route('/help/<page>')
def help(page='index'):
def help(page='dashboard'):
"""Display help documentation from Markdown files"""
import markdown
import os
# Map page names to markdown files
doc_files = {
'index': 'index.md',
'dashboard': 'dashboard.md',
'print_module': 'print_module.md',
'upload_data': 'upload_data.md',
'view_orders': 'view_orders.md',
'print_lost_labels': 'print_lost_labels.md'
'print_lost_labels': 'print_lost_labels.md',
'daily_mirror': 'daily_mirror.md',
'etichete': 'etichete.md'
}
# Get the markdown file path
@@ -3996,7 +3995,7 @@ def help(page='index'):
return render_template('docs/help_viewer.html',
error=f"Documentația pentru '{page}' nu a fost găsită.")
doc_path = os.path.join(current_app.static_folder, 'docs', doc_files[page])
doc_path = os.path.join(current_app.root_path, 'static', 'docs', doc_files[page])
try:
# Read and convert markdown to HTML