docs: extract signature lines with `includecode`

by matching `def <snippet>` up to (but not including) the trailing `=`
docs: document `headerValueByName` as an example for documenting other directives