skip to main content

NAME

migrate-links

SYNOPSIS

antenna migrate-links [-w] [PATH]

DESCRIPTION

Changes the links in your Markdown that point at an .html page antenna renders from Markdown into links to the .md source. A Markdown reader such as BonBon follows an .html link to the HTML page (BonBon opens it in the system browser); the .md link keeps the reader in Markdown. This is the change antenna validate reports as link-html.

By default it is a dry run: it prints each change as a unified diff and changes nothing. Add -w to write the files. Review the diff first, and keep your site in git so you can look at what was written.

With no PATH it works on the Markdown the site’s own data names: the pages, the collection source files and the posts. A PATH limits it to one file or the Markdown files under one directory.

What it changes, and what it does not:

Running it again changes nothing.

OPTIONS

-w
Write the changes. Without it nothing is written.

EXIT STATUS

0
It ran: a dry run, a write, or nothing to migrate.
2
The command line is wrong (an unknown option, more than one PATH).
65
A file could not be parsed. It is reported and the other files are still done; the exit status is the class of the first failure.
66
PATH does not exist, or there is no configuration file.
74
A file could not be written.

EXAMPLES

antenna migrate-links antenna migrate-links blog antenna migrate-links -w blog/index.md antenna validate | grep link-html

SEE ALSO

antenna help validate antenna help markdown-web