okf/broken-link
Links within the tree point at files that exist (a warning: OKF says never reject a bundle for broken links, §6.1, §11).
Concepts link to each other with ordinary markdown links, relative to the linking file’s folder, like ./other.md, or from the tree’s root, like /tables/customers.md (§6.1). Each survives a different move: a relative link survives renaming or moving a folder that holds both pages, and a link from the root survives moving the page that has it. In a tree kept in a folder of its repository (okf/, as the templates have it), only relative links work on GitHub, which reads / from the repository’s root. Path fields such as resource and superseded_by are checked too: those written /…, ./…, or ../…, and under OKF 0.3 a bare one, which resolves from the concept’s folder (§6.2), so a path 0.2’s examples wrote from the tree’s root needs its leading /. OKF says a broken link isn’t malformed, since it may point at knowledge not written yet, and consumers must not reject a bundle for one (§11). So this is a warning: it finds links to files that don’t exist, and links that climb out of the tree.
Example
Section titled “Example”This file breaks the rule:
---type: Metrictitle: Monthly churndescription: The share of customers who cancel in a month.---
Churn counts the cancellations in the [customer table](/tables/customer.md).okforest validate reports:
churn.md 7:39 warning `/tables/customer.md` does not exist in this tree (looked for `tables/customer.md`). okf/broken-linkFixed:
---type: Metrictitle: Monthly churndescription: The share of customers who cancel in a month.---
Churn counts the cancellations in the [customer table](/tables/customers.md).