@salesforcedevs/sfdocs-liquid-lint-filtered-xref
v1.0.6
Published
Reports errors when topics cross-reference filtered topics (englishonly, future, etc.).
Maintainers
Keywords
Readme
liquid-lint-filtered-xref
This remark-lint plugin reports warnings when a topic cross-references another
topic that is marked as filtered (e.g. englishonly, future) in the TOC. Such
targets won't be available in localized or filtered builds, producing broken
links at runtime.
What it checks
- Internal links and images: walks the AST for
linkandimagenodes and resolves relative paths against the current file. - Filter-aware: checks each resolved path against a map of filtered topic paths (keyed by filter name). Warns per filter that hides the target.
- Skips external URLs:
http://,https://, and fragment-only (#) links are ignored.
Options
{
filteredTopicPaths?: Map<string, Set<string>>
}A map from filter name (e.g. "englishonly") to the set of absolute file paths
that are filtered by that tag. Built by the validation context service in
doc-framework-monorepo.
Install & build
yarn install && yarn buildRelease versioning and commits are automated via Lerna when you merge the release PR.
