Files
gh-christianlouis-docuelevate/app/views/help.py
T
copilot-swe-agent[bot] af3eed4040 feat(help): restructure /help as user-facing Help Center with Zammad integration
- Replace MkDocs redirect with a branded, SEO-optimised Help Center template
- Add sections: Quick Start, Sources, Destinations, Workflows, FAQ, Support
- Integrate optional Zammad live-chat widget and ticket form
- Add config settings: ZAMMAD_URL, ZAMMAD_CHAT_ENABLED, ZAMMAD_CHAT_ID,
  ZAMMAD_FORM_ENABLED, SUPPORT_EMAIL
- Move MkDocs developer docs from /help to /developer-docs
- Move interactive API docs (Swagger/ReDoc) to /admin/api-docs and /admin/api-redoc
- Add API Docs and Developer Docs links to Admin menu (desktop + mobile)
- Update navigation Help link from /help/ to /help
- Update .env.demo with Zammad configuration examples
- Document new settings in docs/ConfigurationGuide.md
- Rewrite tests to cover new Help Center behaviour

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
2026-03-08 17:25:34 +00:00

43 lines
1.3 KiB
Python

"""
Help Center view routes.
Renders a user-facing, SEO-optimised Help Center page at ``/help``.
The page is designed for SaaS end-users and includes guidance on
features, integrations, workflows, and optional Zammad support widgets
(live-chat and feedback form).
The developer-oriented MkDocs documentation is served separately at
``/docs`` and is intentionally **not** cross-linked from this page.
"""
import logging
import pathlib
from fastapi import Request
from app.config import settings
from app.views.base import APIRouter, templates
logger = logging.getLogger(__name__)
router = APIRouter()
# Path to the built MkDocs documentation (kept for reference / backwards compat)
_DOCS_BUILD_DIR = pathlib.Path(__file__).parents[2] / "docs_build"
@router.get("/help", include_in_schema=False)
async def help_center(request: Request):
"""Render the end-user Help Center page."""
return templates.TemplateResponse(
"help.html",
{
"request": request,
"zammad_url": settings.zammad_url,
"zammad_chat_enabled": settings.zammad_chat_enabled,
"zammad_chat_id": settings.zammad_chat_id,
"zammad_form_enabled": settings.zammad_form_enabled,
"support_email": settings.support_email,
},
)