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>
This commit is contained in:
+11
-4
@@ -137,7 +137,12 @@ async def lifespan(app: FastAPI):
|
||||
notify_shutdown()
|
||||
|
||||
|
||||
app = FastAPI(title="DocuElevate", lifespan=lifespan)
|
||||
app = FastAPI(
|
||||
title="DocuElevate",
|
||||
lifespan=lifespan,
|
||||
docs_url="/admin/api-docs",
|
||||
redoc_url="/admin/api-redoc",
|
||||
)
|
||||
|
||||
# Initialize rate limiter and attach to app state
|
||||
limiter = create_limiter(redis_url=settings.redis_url, enabled=settings.rate_limiting_enabled)
|
||||
@@ -202,14 +207,16 @@ if os.path.exists(static_dir):
|
||||
else:
|
||||
print(f"WARNING: Static directory not found at {static_dir}. Static files will not be served.")
|
||||
|
||||
# Mount the built MkDocs documentation site at /help/
|
||||
# Mount the built MkDocs developer documentation at /developer-docs/
|
||||
# These docs target administrators and developers, not end-users.
|
||||
# The user-facing Help Center is served by the /help view instead.
|
||||
# The docs are pre-built into docs_build/ during the Docker image build.
|
||||
# When running locally, run `mkdocs build` from the repo root first.
|
||||
docs_build_dir = pathlib.Path(__file__).parents[1] / "docs_build"
|
||||
if os.path.exists(docs_build_dir):
|
||||
app.mount("/help", StaticFiles(directory=str(docs_build_dir), html=True), name="help_docs")
|
||||
app.mount("/developer-docs", StaticFiles(directory=str(docs_build_dir), html=True), name="developer_docs")
|
||||
else:
|
||||
print(f"INFO: Help docs not found at {docs_build_dir}. Run 'mkdocs build' to generate them.")
|
||||
print(f"INFO: Developer docs not found at {docs_build_dir}. Run 'mkdocs build' to generate them.")
|
||||
|
||||
|
||||
# Custom exception handlers that return JSON for API routes and HTML for frontend routes
|
||||
|
||||
Reference in New Issue
Block a user