Skip to content

Commit

Permalink
[Filter] add usage notes for makedeps, rewrite and include-md (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
cagix authored Aug 22, 2023
1 parent 4709f2f commit 8c2d75b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions filters/hugo_makedeps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ images and local links to Markdown files. For each such link, this process will
(recursively, via breadth-first search).
Usage: This filter is intended to be used with individual files that are placed directly in
the working directory.
Examples:
pandoc -L hugo_makedeps.lua -t markdown readme.md
Caveats:
(a) All referenced Markdown files must have UNIQUE NAMES.
(b) References to the top index page (landing page) are (presumably) not working.
Expand Down
8 changes: 8 additions & 0 deletions filters/hugo_rewritelinks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ Thus this filter needs to perform for any link in any Markdown file:
- replace `[Y](readme.md)` with `[Y]({{< ref "/" >}})` (might work with Hugo)
Usage: This filter is intended to be used with individual files that are placed either directly in
the working directory or in a subdirectory.
Examples:
pandoc -L hugo_rewritelinks.lua -t markdown readme.md
pandoc -L hugo_rewritelinks.lua -t markdown test/readme.md
pandoc -L hugo_rewritelinks.lua -t markdown test/subdir/leaf/foo.md
Caveats:
(a) All referenced Markdown files must have UNIQUE NAMES.
(b) References to the top index page (landing page) are (presumably) not working.
Expand Down
7 changes: 7 additions & 0 deletions filters/include-mdfiles.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ for each link to local Markdown file in start document:
- return block list to replace current Para
Usage: This filter is intended to be used with individual files that are placed directly in
the working directory.
Examples:
pandoc -L include-mdfiles.lua -t markdown readme.md
pandoc -L include-mdfiles.lua -t markdown summary.md
Caveats:
The same file cannot be included more than once to avoid potential endless recursion.
]]--
Expand Down

0 comments on commit 8c2d75b

Please sign in to comment.