67 lines
2.1 KiB
Markdown
67 lines
2.1 KiB
Markdown
# Help Page - Node Documentation with Markdown
|
|
|
|
Source: <https://docs.comfy.org/custom-nodes/help_page>
|
|
|
|
How to create rich documentation for your custom nodes
|
|
|
|
## Node Documentation with Markdown
|
|
|
|
Custom nodes can include rich markdown documentation that will be displayed in the UI instead of the generic node description. This provides users with detailed information about your node's functionality, parameters, and usage examples.
|
|
|
|
## Setup
|
|
|
|
To add documentation for your nodes:
|
|
|
|
1. Create a `docs` folder inside your `WEB_DIRECTORY`
|
|
2. Add markdown files named after your nodes (the names of your nodes are the dictionary keys in the `NODE_CLASS_MAPPINGS` dictionary used to register the nodes):
|
|
- `WEB_DIRECTORY/docs/NodeName.md` - Default documentation
|
|
- `WEB_DIRECTORY/docs/NodeName/en.md` - English documentation
|
|
- `WEB_DIRECTORY/docs/NodeName/zh.md` - Chinese documentation
|
|
- Add other locales as needed (e.g., `fr.md`, `de.md`, etc.)
|
|
|
|
The system will automatically load the appropriate documentation based on the user's locale, falling back to `NodeName.md` if a localized version is not available.
|
|
|
|
## Supported Markdown Features
|
|
|
|
- Standard markdown syntax (headings, lists, code blocks, etc.)
|
|
- Images using markdown syntax: ``
|
|
- HTML media elements with specific attributes:
|
|
- `<video>` and `<source>` tags
|
|
- Allowed attributes: `controls`, `autoplay`, `loop`, `muted`, `preload`, `poster`
|
|
|
|
## Example Structure
|
|
|
|
```
|
|
my-custom-node/
|
|
├── __init__.py
|
|
├── web/ # WEB_DIRECTORY
|
|
│ ├── js/
|
|
│ │ └── my-node.js
|
|
│ └── docs/
|
|
│ ├── MyNode.md # Fallback documentation
|
|
│ └── MyNode/
|
|
│ ├── en.md # English version
|
|
│ └── zh.md # Chinese version
|
|
```
|
|
|
|
## Example Markdown File
|
|
|
|
```markdown
|
|
# My Custom Node
|
|
|
|
This node processes images using advanced algorithms.
|
|
|
|
## Parameters
|
|
|
|
- **image**: Input image to process
|
|
- **strength**: Processing strength (0.0 - 1.0)
|
|
|
|
## Usage
|
|
|
|

|
|
|
|
<video controls loop muted>
|
|
<source src="demo.mp4" type="video/mp4">
|
|
</video>
|
|
```
|