Add Help Menu in NodeLibrarySidebarTab (#8179)

This commit is contained in:
Benjamin Lu 2025-06-01 04:32:32 -04:00 committed by GitHub
parent d062fcc5c0
commit 180db6753f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 0 deletions

View File

@ -205,6 +205,19 @@ comfyui-workflow-templates is not installed.
""".strip()
)
@classmethod
def embedded_docs_path(cls) -> str:
"""Get the path to embedded documentation"""
try:
import comfyui_embedded_docs
return str(
importlib.resources.files(comfyui_embedded_docs) / "docs"
)
except ImportError:
logging.info("comfyui-embedded-docs package not found")
return None
@classmethod
def parse_version_string(cls, value: str) -> tuple[str, str, str]:
"""

View File

@ -1,5 +1,6 @@
comfyui-frontend-package==1.21.3
comfyui-workflow-templates==0.1.23
comfyui-embedded-docs==0.2.0
torch
torchsde
torchvision

View File

@ -746,6 +746,13 @@ class PromptServer():
web.static('/templates', workflow_templates_path)
])
# Serve embedded documentation from the package
embedded_docs_path = FrontendManager.embedded_docs_path()
if embedded_docs_path:
self.app.add_routes([
web.static('/docs', embedded_docs_path)
])
self.app.add_routes([
web.static('/', self.web_root),
])