From 53bc9d32190af3ba5a7def9593c4d94c8747817a Mon Sep 17 00:00:00 2001 From: Alexander Miranda Date: Wed, 19 Jun 2024 13:31:07 -0500 Subject: [PATCH] feat: #1140 updating doc gen docs for new method --- site/content/docgen/md.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/site/content/docgen/md.md b/site/content/docgen/md.md index 1659175..c687314 100644 --- a/site/content/docgen/md.md +++ b/site/content/docgen/md.md @@ -79,6 +79,12 @@ func GenMarkdownTreeCustom(cmd *Command, dir string, filePrepender, linkHandler } ``` +```go +func GenMarkdownTreeCustomWithFooter(cmd *Command, dir string, filePrepender, fileAppender, linkHandler func(string) string) error { + //... +} +``` + ```go func GenMarkdownCustom(cmd *Command, out *bytes.Buffer, linkHandler func(string) string) error { //... @@ -105,6 +111,8 @@ filePrepender := func(filename string) string { } ``` +The `fileAppender` will append the return value given the full filepath to the rendered Markdown file. + The `linkHandler` can be used to customize the rendered internal links to the commands, given a filename: ```go