兼容docker和整合包下FAQ的加载逻辑

This commit is contained in:
puke
2025-12-10 16:45:24 +08:00
parent 4ff3c50cf3
commit 4be70516c5
3 changed files with 14 additions and 9 deletions

View File

@@ -64,6 +64,7 @@ COPY templates ./templates
COPY workflows ./workflows COPY workflows ./workflows
COPY resources ./resources COPY resources ./resources
COPY docs/images ./docs/images COPY docs/images ./docs/images
COPY docs/FAQ.md docs/FAQ_CN.md ./docs/
# Create output, data and temp directories # Create output, data and temp directories
RUN mkdir -p /app/output /app/data /app/temp RUN mkdir -p /app/output /app/data /app/temp

View File

@@ -47,7 +47,7 @@ build:
- "docs/zh/*" # Don't include Chinese docs - "docs/zh/*" # Don't include Chinese docs
- "docs/gallery/*" # Don't include gallery docs - "docs/gallery/*" # Don't include gallery docs
- "docs/stylesheets/*" # Don't include doc stylesheets - "docs/stylesheets/*" # Don't include doc stylesheets
- "docs/*.md" # Don't include doc markdown files # Note: FAQ.md and FAQ_CN.md are included for in-app FAQ feature
- "test_*.py" # Don't include test files - "test_*.py" # Don't include test files
- ".venv" - ".venv"
- "venv" - "venv"

View File

@@ -85,12 +85,16 @@ def render_faq_sidebar():
# Display FAQ content # Display FAQ content
st.markdown(faq_content, unsafe_allow_html=True) st.markdown(faq_content, unsafe_allow_html=True)
else:
# Show error message if FAQ cannot be loaded
st.warning(tr('faq.load_error', fallback='Failed to load FAQ content'))
# Add a link to GitHub issues for more help # Add a link to GitHub issues for more help
st.markdown( st.markdown(
f"💡 {tr('faq.more_help', fallback='Need more help?')} " f"💡 {tr('faq.more_help', fallback='Need more help?')} "
f"[GitHub Issues](https://github.com/AIDC-AI/Pixelle-Video/issues)" f"[GitHub Issues](https://github.com/AIDC-AI/Pixelle-Video/issues)"
) )
else:
# If FAQ cannot be loaded, only show the GitHub link
st.markdown(f"### 💡 {tr('faq.more_help', fallback='Need help?')}")
st.markdown(
f"[GitHub Issues](https://github.com/AIDC-AI/Pixelle-Video/issues) | "
f"[Documentation](https://aidc-ai.github.io/Pixelle-Video)"
)