From cae38571fdf412642c0e2066b4dbc0fdf0b3d80d Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 2 Jul 2021 00:48:45 -0700 Subject: [PATCH] Generate documentation before running link check (#78) * 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. * 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. --- Taskfile.yml | 7 +++++++ docs/usage.md | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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 ' 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