2 releases
0.1.2 | Mar 9, 2021 |
---|---|
0.1.1 | Mar 4, 2021 |
#1406 in Text processing
11KB
188 lines
yarner-block-links
A Yarner plugin that adds to each code block a list of links to all referenced and all referencing blocks.
Example:
A list of links is placed under each code block that references other blocks:
Blocks that are referenced by other blocks get a list of usages added. The first referenced block:
The second referenced block:
|
Installation
Binaries
- Download the latest binaries for your platform
- Unzip somewhere
- Add the parent directory of the executable to your
PATH
environmental variable
Using cargo
> cargo install yarner-block-links
Usage
Add a section plugin.block-links
to your Yarner.toml
:
[plugin.block-links]
Options
The plugin provides optional configuration for link formatting. Defaults are as follows (but all options can be left out):
[plugin.block-links]
template = "{{#if usage}}> Usage: {{usage}} \n{{/if}}{{#if macros}}> Macros: {{macros}}{{/if}}"
join = " "
label = "`{{label}}`"
Option | Details |
---|---|
template |
Template for formatting of the links section(s) |
join |
Separator between links |
label |
Formatting of link labels |
Dependencies
~6–8.5MB
~155K SLoC