From dcbdd64f5bdcc7cc9557f4511df1026cdef19bd5 Mon Sep 17 00:00:00 2001 From: Andrew Baldwin Date: Tue, 18 Feb 2025 13:05:42 -0800 Subject: [PATCH 1/4] Add `mdbook-linkcheck` to check links in documentation. --- .github/workflows/gh-page-unstable.yml | 2 +- .github/workflows/gh-page.yml | 2 +- book/book.toml | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gh-page-unstable.yml b/.github/workflows/gh-page-unstable.yml index 07cba621a..fa4b943b5 100644 --- a/.github/workflows/gh-page-unstable.yml +++ b/.github/workflows/gh-page-unstable.yml @@ -24,4 +24,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_branch: gh-pages-unstable - publish_dir: ./book/book + publish_dir: ./book/book/html diff --git a/.github/workflows/gh-page.yml b/.github/workflows/gh-page.yml index 2d8472aed..b9caa9867 100644 --- a/.github/workflows/gh-page.yml +++ b/.github/workflows/gh-page.yml @@ -23,4 +23,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./book/book + publish_dir: ./book/book/html diff --git a/book/book.toml b/book/book.toml index a6701cd75..68673e4cf 100644 --- a/book/book.toml +++ b/book/book.toml @@ -7,4 +7,6 @@ src = "src" [output.html] cname = "halloy.squidowl.org" git-repository-url = "https://github.com/squidowl/halloy" -edit-url-template = "https://github.com/squidowl/halloy/edit/main/book/{path}" \ No newline at end of file +edit-url-template = "https://github.com/squidowl/halloy/edit/main/book/{path}" + +[output.linkcheck] From 98e5ea9cef956c846db799e5ee12417cec714c83 Mon Sep 17 00:00:00 2001 From: Andrew Baldwin Date: Tue, 18 Feb 2025 12:53:06 -0800 Subject: [PATCH 2/4] Fix broken links found by `mdbook-linkcheck`. --- book/src/configuration/buffer.md | 2 +- book/src/configuration/servers.md | 4 ++-- book/src/guides/getting-started.md | 4 ++-- book/src/guides/multiple-servers.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/book/src/configuration/buffer.md b/book/src/configuration/buffer.md index 91d14b1dd..1d4bee8ba 100644 --- a/book/src/configuration/buffer.md +++ b/book/src/configuration/buffer.md @@ -554,7 +554,7 @@ Control if the text input should auto format the input. By default text is only auto_format = "markdown" ``` -> 💡 Read more about [text formatting](../../guides/text-formatting.html). +> 💡 Read more about [text formatting](../guides/text-formatting.html). ### `[buffer.text_input.autocomplete]` diff --git a/book/src/configuration/servers.md b/book/src/configuration/servers.md index e7e375e5d..d5f3ca0bb 100644 --- a/book/src/configuration/servers.md +++ b/book/src/configuration/servers.md @@ -9,7 +9,7 @@ Eg: # ... ``` -> 💡 For a multiple server example see [here](../../guides/multiple-servers.html) +> 💡 For a multiple server example see [here](../guides/multiple-servers.html) ## `nickname` @@ -368,7 +368,7 @@ who_poll_interval = 2 A list of nicknames to [monitor](https://ircv3.net/specs/extensions/monitor) (if IRCv3 Monitor is supported by the server). -> 💡 Read more about [monitoring users](../../guides/monitor-users.html). +> 💡 Read more about [monitoring users](../guides/monitor-users.html). ```toml # Type: array of string diff --git a/book/src/guides/getting-started.md b/book/src/guides/getting-started.md index 4554d6cfb..73ccf176f 100644 --- a/book/src/guides/getting-started.md +++ b/book/src/guides/getting-started.md @@ -4,7 +4,7 @@ To get started with Halloy, you need to connect to at least one IRC server. The Once connected to a server, you can join channels. This can be done automatically from the config file or manually using the join command: `/join #channel`[^1]. To find channels, you can either use the list command: `/list`, or [browse for channels online](https://netsplit.de/channels/). -> 💡 Configuration in Halloy happens through a `config.toml` file. See [Configuration](../configuration/index.html). +> 💡 Configuration in Halloy happens through a `config.toml` file. See [Configuration](../configuration/). Here are a few useful IRC commands for a new user[^2] @@ -18,4 +18,4 @@ Here are a few useful IRC commands for a new user[^2] [^1]: Channel names always start with a `#` symbol and do not contain spaces. -[^2]: Find more commands [here](https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands). \ No newline at end of file +[^2]: Find more commands [here](https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands). diff --git a/book/src/guides/multiple-servers.md b/book/src/guides/multiple-servers.md index 2d3302fcb..8e90cc82a 100644 --- a/book/src/guides/multiple-servers.md +++ b/book/src/guides/multiple-servers.md @@ -1,7 +1,7 @@ # Multiple servers Creating multiple `[servers]` sections lets you connect to multiple servers. -All configuration options can be found [here](../configuration/servers/index.html). +All configuration options can be found [here](../configuration/servers.html). ```toml [servers.liberachat] From 50df95226b761e46ad6113b2c597f94caf82c7c2 Mon Sep 17 00:00:00 2001 From: Casper Rogild Storm Date: Wed, 19 Feb 2025 21:18:42 +0100 Subject: [PATCH 3/4] Update gh-page.yml --- .github/workflows/gh-page.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gh-page.yml b/.github/workflows/gh-page.yml index b9caa9867..2103b0930 100644 --- a/.github/workflows/gh-page.yml +++ b/.github/workflows/gh-page.yml @@ -17,6 +17,9 @@ jobs: with: mdbook-version: 'latest' + - name: Install mdbook plugins + run: cargo install mdbook-linkcheck + - run: mdbook build book - name: Publish book From 8e6f9eb89fa06569834d5abdcff938309acffc24 Mon Sep 17 00:00:00 2001 From: Casper Rogild Storm Date: Wed, 19 Feb 2025 21:19:28 +0100 Subject: [PATCH 4/4] Update gh-page-unstable.yml --- .github/workflows/gh-page-unstable.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/gh-page-unstable.yml b/.github/workflows/gh-page-unstable.yml index fa4b943b5..e61d6d0e8 100644 --- a/.github/workflows/gh-page-unstable.yml +++ b/.github/workflows/gh-page-unstable.yml @@ -17,6 +17,9 @@ jobs: with: mdbook-version: 'latest' + - name: Install mdbook plugins + run: cargo install mdbook-linkcheck + - run: mdbook build book - name: Publish book