docs: includecode can now extract signature lines

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