Documentation
¶
Overview ¶
word-count is an example mdpress plugin that counts words in each chapter.
Protocol:
- Reads a JSON request from stdin on each hook invocation.
- Writes a JSON response to stdout with optional content modifications.
- Logs statistics to stderr; mdpress captures stderr and emits it as debug logs.
Supported flags:
--mdpress-info Print plugin metadata as JSON and exit. --mdpress-hooks Print the list of hook phases this plugin handles and exit.
Example book.yaml entry:
plugins:
- name: word-count
path: ./plugins/word-count
config:
warn_threshold: 500
Click to show internal directories.
Click to hide internal directories.