The rules and macros described below are used to maintain markdown files.
On this page:
markdown_check_links_test(name, config, data, max_econnreset_retry_count, quiet, srcs, verbose)
Using markdown-link-check
, check the links in a markdown file to ensure that they are valid.
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
config | A markdown-link-check JSON configuration file. |
Label | optional | @cgrindel_bazel_starlib//markdown:default_markdown_link_check_config |
data | Any data files that need to be present for the link check to succeed. | List of labels | optional | [] |
max_econnreset_retry_count | The maximum number of times to retry on an ECONNRESET error. | Integer | optional | 3 |
quiet | If set to true, the markdown-link-check will be configured to only display errors. | Boolean | optional | True |
srcs | The markdown files that should be checked. If no srcs are provided, all of the markdown files (.md, .markdown) in the data will be checked. |
List of labels | optional | [] |
verbose | If set to true, the markdown-link-check will be configured for verbose output. | Boolean | optional | False |
markdown_generate_toc(name, output_suffix, remove_toc_header_entry, srcs, toc_header)
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
output_suffix | The suffix added to the output file with the updated TOC. | String | optional | ".toc_updated" |
remove_toc_header_entry | Specifies whether the header for the TOC should be removed from the TOC. | Boolean | optional | True |
srcs | The markdown files that will be updated with a table of contents. | List of labels | required | |
toc_header | The header that leads the TOC. | String | optional | "Table of Contents" |
markdown_pkg(name, srcs, toc_visibility, update_visibility, define_doc_files, doc_files_visibility, additional_doc_files)
Adds targets to maintain markdown files in the package.
This macro adds targets to generate a table of contents (TOC) for markdown files (markdown_generate_toc
), adds diff_test
targets to confirm that the markdown files are up-to-date with the latest TOC, adds a target to update the markdown files with the generated files (updatesrc_update
) and defines a filegroup
that is useful to collecting documentation files for confirming that a markdown files links are valid (markdown_check_links_test
)
PARAMETERS
markdown_register_node_deps(name)
Configures the installation of the Javascript node dependencies for the markdown functionality.
PARAMETERS
Name | Description | Default Value |
---|---|---|
name | Optional. The name of the yarn repository that will be defined. |
"cgrindel_bazel_starlib_markdown_npm" |