@@ -5,24 +5,52 @@ Render man pages for your script.
55Note that this renderer will render specially formatted markdown documents and
66will then use [ pandoc] ( https://command-not-found.com/pandoc ) to convert them.
77
8- Setting the environment variable ` PREVIEW ` to the full command you wish to
9- preview, will prompt the renderer to show the output using the ` man ` command
10- after rendering.
11-
128## Usage
139
1410``` bash
1511# Generate all man pages to the ./docs directory
1612$ bashly render :mandoc docs
13+ ```
14+
15+ ## Special template features
16+
17+ ### Preview
1718
18- # .. and also preview the page for the "cli download" command
19+ Setting the environment variable ` PREVIEW ` to the full command you wish
20+ to preview, will prompt the renderer to show the output using the ` man `
21+ command after rendering.
22+
23+ ``` bash
24+ # Preview the page for the "cli download" command
1925$ PREVIEW=" cli download" bashly render :mandoc docs
2026
21- # .. and also watch for changes
27+ # .. and also watch for changes (after existing the man preview)
2228$ PREVIEW=" cli download" bashly render :mandoc docs --watch
2329```
2430
25- ## Appending a footer
31+ ### Footer
32+
33+ You can add additional sections to any of the generated man pages, by
34+ adding a property named ` x_mandoc_footer ` to any of your commands in
35+ your ` bashly.yml ` .
36+
37+ This field should contain a markdown string, for example:
2638
27- In case you wish to append additional sections to your generated man pages,
28- you can place a file named ` _footer.md ` in your target directory.
39+ ``` yaml
40+ x_mandoc_footer : |-
41+ # ISSUE TRACKER
42+
43+ Report issues at <https://github.com/lanalang/smallville>
44+ ` ` `
45+
46+ ### Authors
47+
48+ You can specify an authors string that will be added to the man page,
49+ by adding a property named ` x_mandoc_authors` to any of your commands
50+ in your `bashly.yml`.
51+
52+ For example :
53+
54+ ` ` ` yaml
55+ x_mandoc_authors: Lana Lang
56+ ` ` `
0 commit comments