Ellerbach / docfx-companion-tools

A suite of tools, pipelines templates to take the very best of DocFX
MIT License
64 stars 18 forks source link

DocLinkChecker - Add support for relative path from root directory reference #12

Closed jrmoulckers closed 1 year ago

jrmoulckers commented 1 year ago

Please add DocLinkChecker support for using the ~ character to represent relative paths from the root of a DocFX project.

This is essential for deeper project structures that utilize the .attachments folder at the root of a project.

This behavior is also officially supported by DocFX, but results in a failure using the companion tool suite:

Not found: ~/.attachments/abc.png

From the DocFX Tutorial page on Links and Cross References:

Sometimes you may find it's complicated to calculate relative path between two files. DocFX also supports paths that start with ~ to represent a path relative to the root directory of your project (i.e., where docfx.json is located). This kind of path will also be validated and resolved during build.

Ellerbach commented 1 year ago

Please add DocLinkChecker support for using the ~ character to represent relative paths from the root of a DocFX project.

You are right. We'll look at this.

Ellerbach commented 1 year ago

Closing issue as the PR is now merged. thanks again for bringing it!