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

Fix edge cases in link check #15

Closed josesimoes closed 1 year ago

josesimoes commented 1 year ago

Checked locally by validating this repo/commit: nanoframework/nanoframework.github.io

Fixing issues wrongly reported in this build: https://dev.azure.com/nanoframework/nanoframework%20docs/_build/results?buildId=38903&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=72c3483f-759b-5fe1-97d0-7523409e045c

D:\a\1\s\content\architecture\simplifications-and-trade-offs.md 33:123
In doc link was not found 'string-format-examples.md#d-decimal'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\architecture\simplifications-and-trade-offs.md 34:127
In doc link was not found 'string-format-examples.md#f-fixed-point'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\architecture\simplifications-and-trade-offs.md 35:123
In doc link was not found 'string-format-examples.md#g-general'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\architecture\simplifications-and-trade-offs.md 36:122
In doc link was not found 'string-format-examples.md#n-number'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\architecture\simplifications-and-trade-offs.md 37:127
In doc link was not found 'string-format-examples.md#x-hexadecimal'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\building\cmake-presets.md 13:21
In doc link was not found '../faq/automatic-firmware-updates.md#how-to-prevent-a-board-from-updating-if-working-on-a-custom-firmware'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\building\cmake-presets.md 14:36
In doc link was not found 'build-instructions.md#build_version-matching'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\building\cmake-presets.md 112:61
In doc link was not found '../architecture/wire-protocol.md#crc32-validatons'. Make sure you have all lowercase, remove '*' and replace spaces by '-'.
D:\a\1\s\content\contributing\contributing-workflow.md 91:22
Ellerbach commented 1 year ago

Any source document that breaks to 1: be able to test, 2: understand if that's already formed correctly :-)

josesimoes commented 1 year ago

Yes! That's on the comment above.

  1. clone repo above (in that commit, which is the latest)
  2. run tool: it shows those errors as in the AZDO log
josesimoes commented 1 year ago

As for docfx support for HTML links: https://dotnet.github.io/docfx/tutorial/links_and_cross_references.html#links-in-inline-html Plus those links as they are now are correctly processed by docfx if one skips this check. As you can see here.

Ellerbach commented 1 year ago

So for the record, this pattern seems to be the issue that your PR is fixing:

image

For example in this file: https://github.com/nanoframework/nanoframework.github.io/blob/pages-source/content/architecture/simplifications-and-trade-offs.md

josesimoes commented 1 year ago

Dropping PR.