Skip to content

Commit

Permalink
Generate documentation before running link check (#78)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
per1234 committed Jul 2, 2021
1 parent 8b49417 commit cae3857
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Taskfile.yml
Expand Up @@ -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
Expand All @@ -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 '
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Expand Up @@ -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

0 comments on commit cae3857

Please sign in to comment.