You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,58 @@ The reference implementation of the Pandoc lua filter is in [panvimdoc.lua](./sc
58
58
59
59
If you would like to contribute to the specification please feel free to comment on this issue: <https://github.com/kdheepak/panvimdoc/issues/1>.
60
60
61
+
# Usage
62
+
63
+
```bash
64
+
pandoc -t scripts/panvimdoc.lua ${INPUT}${OUTPUT}
65
+
```
66
+
67
+
The following are the metadata fields that the custom writer uses:
68
+
69
+
-`project` (String) _required_: This is typically the plugin name. This is prefixed to all generated tags
70
+
-`vimdoctitle` (String) _required_: This is the name of the documentation file that you want to generate
71
+
-`vimversion` (String) _optional_: The version vim / neovim that the plugin is targeting. If not present, the version of vim in the available environment is used.
72
+
-`toc` (Boolean) _optional_: Whether to generate table of contents or not
73
+
74
+
Example:
75
+
76
+
```markdown
77
+
---
78
+
project: panvimdoc
79
+
vimdoctitle: panvimdoc.txt
80
+
vimversion: Neovim v0.5.0
81
+
toc: true
82
+
---
83
+
```
84
+
85
+
## Using Github Actions
86
+
87
+
Add the following to `./.github/workflows/pandocvim.yml`:
88
+
89
+
```yaml
90
+
name: panvimdoc
91
+
92
+
on: [push]
93
+
94
+
jobs:
95
+
custom_test:
96
+
runs-on: ubuntu-latest
97
+
name: pandoc to vimdoc
98
+
steps:
99
+
- uses: actions/checkout@v2
100
+
- name: PanVimDoc
101
+
uses: kdheepak/panvimdoc@v1
102
+
with:
103
+
pandoc: INPUT_FILENAME.md
104
+
vimdoc: doc/OUTPUT_FILENAME.txt
105
+
- uses: stefanzweifel/git-auto-commit-action@v4
106
+
with:
107
+
commit_message: "Auto generate docs"
108
+
branch: ${{ github.head_ref }}
109
+
```
110
+
111
+
Choose `INPUT_FILENAME` and `OUTPUT_FILENAME` appropriately.
0 commit comments