[PR #11] [MERGED] feat: add node help docs scaffold #11

Closed
opened 2026-10-31 22:06:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/cookiecutter-comfy-extension/pull/11
Author: @christian-byrne
Created: 3/29/2026
Status: ✅ Merged
Merged: 3/30/2026
Merged by: @jtydhr88

Base: main ← Head: feat/add-node-help-docs-scaffold


📝 Commits (1)

  • d8078ab feat: add node help docs scaffold

📊 Changes

4 files changed (+24 additions, -7 deletions)

View changed files

📝 hooks/post_gen_project.py (+4 -3)
📝 {{cookiecutter.project_slug}}/custom-nodes-template/MANIFEST.in (+1 -0)
📝 {{cookiecutter.project_slug}}/custom-nodes-template/__init__.py (+0 -4)
➕ {{cookiecutter.project_slug}}/custom-nodes-template/web/docs/Example/en.md (+19 -0)

📄 Description

Summary

Add a web/docs/Example/en.md scaffold so new custom nodes automatically get the node help page file convention set up out of the box.

Docs: https://docs.comfy.org/custom-nodes/help_page

Changes

  1. New file: web/docs/Example/en.md — Example help page matching the Example node from nodes.py, following the locale-subfolder convention (docs/{NodeName}/{locale}.md)

  2. __init__.py — Always export WEB_DIRECTORY = "./web" (previously only exported when frontend_type == "js"). This is needed because web/docs/ must be served for the help system to find the markdown files, even when there are no JS extensions.

  3. MANIFEST.in — Add recursive-include web/docs *.md so help pages are included in packaged distributions.

  4. hooks/post_gen_project.py — When frontend_type == "no", only remove web/js/ instead of the entire web/ directory. This preserves web/docs/ so help pages are available even for pure-Python custom nodes.

Motivation

The ComfyUI frontend has a built-in node help system that renders per-node markdown documentation. Custom nodes provide help content by placing .md files in their WEB_DIRECTORY at docs/{NodeName}/{locale}.md. However, the cookiecutter template currently has no example of this convention, so most custom node authors don't know about it.

By scaffolding the docs directory, new custom nodes will ship with help pages by default — improving the user experience and reducing the need for custom node packs to implement their own help popup solutions.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/cookiecutter-comfy-extension/pull/11 **Author:** [@christian-byrne](https://github.com/christian-byrne) **Created:** 3/29/2026 **Status:** ✅ Merged **Merged:** 3/30/2026 **Merged by:** [@jtydhr88](https://github.com/jtydhr88) **Base:** `main` ← **Head:** `feat/add-node-help-docs-scaffold` --- ### 📝 Commits (1) - [`d8078ab`](https://github.com/Comfy-Org/cookiecutter-comfy-extension/commit/d8078ab5efe56de5defd70af2539f989a27233b0) feat: add node help docs scaffold ### 📊 Changes **4 files changed** (+24 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `hooks/post_gen_project.py` (+4 -3) 📝 `{{cookiecutter.project_slug}}/custom-nodes-template/MANIFEST.in` (+1 -0) 📝 `{{cookiecutter.project_slug}}/custom-nodes-template/__init__.py` (+0 -4) ➕ `{{cookiecutter.project_slug}}/custom-nodes-template/web/docs/Example/en.md` (+19 -0) </details> ### 📄 Description ## Summary Add a `web/docs/Example/en.md` scaffold so new custom nodes automatically get the node help page file convention set up out of the box. **Docs**: https://docs.comfy.org/custom-nodes/help_page ## Changes 1. **New file: `web/docs/Example/en.md`** — Example help page matching the `Example` node from `nodes.py`, following the locale-subfolder convention (`docs/{NodeName}/{locale}.md`) 2. **`__init__.py`** — Always export `WEB_DIRECTORY = "./web"` (previously only exported when `frontend_type == "js"`). This is needed because `web/docs/` must be served for the help system to find the markdown files, even when there are no JS extensions. 3. **`MANIFEST.in`** — Add `recursive-include web/docs *.md` so help pages are included in packaged distributions. 4. **`hooks/post_gen_project.py`** — When `frontend_type == "no"`, only remove `web/js/` instead of the entire `web/` directory. This preserves `web/docs/` so help pages are available even for pure-Python custom nodes. ## Motivation The ComfyUI frontend has a built-in node help system that renders per-node markdown documentation. Custom nodes provide help content by placing `.md` files in their `WEB_DIRECTORY` at `docs/{NodeName}/{locale}.md`. However, the cookiecutter template currently has no example of this convention, so most custom node authors don't know about it. By scaffolding the docs directory, new custom nodes will ship with help pages by default — improving the user experience and reducing the need for custom node packs to implement their own help popup solutions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 22:06:57 +00:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/cookiecutter-comfy-extension#11
No description provided.