From c4b324417ca0729777c8966466042f8e84c0eda0 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 1 Jul 2021 19:56:13 -0700 Subject: [PATCH 1/2] Generate documentation before running link check Some links may point to the generated documentation content, which would result in a failure of the link check. It's true that these links are indeed broken when accessed outside the website, but the primary publishing location for this content is the website. The alternative would be checking the generated content into the repository, but this would either require some fairly complex automation or else a burden on the contributors to keep it synced. --- Taskfile.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index 9c014506..62a18525 100755 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -24,6 +24,11 @@ tasks: cmds: - poetry run mike deploy --update-aliases --push --remote {{.DOCS_REMOTE}} {{.DOCS_VERSION}} {{.DOCS_ALIAS}} + docs:generate: + desc: Create all generated documentation content + deps: + - task: docs:gen:commands + docs:gen:commands: desc: Generate command reference files dir: ./docsgen @@ -43,6 +48,8 @@ tasks: docs:check-links: desc: Verifies there are no dead links in documentation + deps: + - task: docs:generate cmds: - | npx -p markdown-link-check -c ' From 323f7bfe6d49be37bc1664879ba5bdc240690c4d Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 1 Jul 2021 20:04:35 -0700 Subject: [PATCH 2/2] Use relative link to command reference in docs It's important to use relative links so that the user's website version selection is retained. --- docs/usage.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/usage.md b/docs/usage.md index 2d1fb41f..59cd7bc3 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -57,4 +57,4 @@ The full list of command line options can be obtained with the `-h` option: `./a For further information you can use the [command reference] [install]: installation.md -[command reference]: https://arduino.github.io/arduino-fwuploader/dev/commands/arduino-fwuploader/ +[command reference]: commands/arduino-fwuploader.md