Skip to content

Commit f42ca65

Browse files
authored
Fix Links & Add Link Checker (#2769)
* feat: link checker
1 parent ae4a246 commit f42ca65

File tree

30 files changed

+949
-925
lines changed

30 files changed

+949
-925
lines changed

.github/workflows/main.yml

+19
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,25 @@ jobs:
159159
# todo: re-enable warnings
160160
# RUSTDOCFLAGS: --cfg docsrs -Dwarnings
161161

162+
# Check for invalid links in the repository
163+
link-check:
164+
if: github.event.pull_request.draft == false
165+
name: Check For Invalid Links
166+
runs-on: ubuntu-latest
167+
steps:
168+
- uses: actions/checkout@v4
169+
- name: Restore lychee cache
170+
uses: actions/cache@v3
171+
with:
172+
path: .lycheecache
173+
key: cache-lychee-${{ github.sha }}
174+
restore-keys: cache-lychee-
175+
- name: Run lychee
176+
uses: lycheeverse/lychee-action@v1
177+
with:
178+
args: --base . --config ./lychee.toml './**/*.md'
179+
fail: true
180+
162181
check:
163182
if: github.event.pull_request.draft == false
164183
name: Check

lychee.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# This is the configuration file for lychee, a link validator.
2+
exclude = ['file:///', 'https://github.com/DioxusLabs/dioxus/commit']
3+
exclude_path = ['target']
4+
no_progress = false
5+
cache = true
6+
max_cache_age = "10d"

packages/autofmt/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
99
[crates-url]: https://crates.io/crates/dioxus-autofmt
1010
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
11-
[mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE
11+
[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
1212
[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
1313
[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
1414
[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
@@ -36,7 +36,7 @@ This is done manually with a via set of formatting rules. The output is not guar
3636

3737
This project is licensed under the [MIT license].
3838

39-
[mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
39+
[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
4040

4141
Unless you explicitly state otherwise, any contribution intentionally submitted
4242
for inclusion in Dioxus by you shall be licensed as MIT without any additional

packages/check/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[crates-badge]: https://img.shields.io/crates/v/dioxus-autofmt.svg
99
[crates-url]: https://crates.io/crates/dioxus-check
1010
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
11-
[mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE
11+
[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
1212
[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
1313
[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
1414
[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
@@ -32,7 +32,7 @@
3232

3333
This project is licensed under the [MIT license].
3434

35-
[mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
35+
[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
3636

3737
Unless you explicitly state otherwise, any contribution intentionally submitted
3838
for inclusion in Dioxus by you shall be licensed as MIT without any additional

packages/config-macro/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
[crates-badge]: https://img.shields.io/crates/v/dioxus-config-macro.svg
99
[crates-url]: https://crates.io/crates/dioxus-config-macro
1010
[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
11-
[mit-url]: https://github.com/dioxuslabs/dioxus/blob/master/LICENSE
11+
[mit-url]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
1212
[actions-badge]: https://github.com/dioxuslabs/dioxus/actions/workflows/main.yml/badge.svg
1313
[actions-url]: https://github.com/dioxuslabs/dioxus/actions?query=workflow%3ACI+branch%3Amaster
1414
[discord-badge]: https://img.shields.io/discord/899851952891002890.svg?logo=discord&style=flat-square
1515
[discord-url]: https://discord.gg/XgGxMSkvUM
1616

1717
[Website](https://dioxuslabs.com) |
1818
[Guides](https://dioxuslabs.com/learn/0.5) |
19-
[API Docs](https://docs.rs/dioxus-config-macro/latest/dioxus_core_macro) |
19+
[API Docs](https://docs.rs/dioxus-config-macro/latest/dioxus_config_macro/) |
2020
[Chat](https://discord.gg/XgGxMSkvUM)
2121

2222
## Overview
@@ -32,7 +32,7 @@
3232

3333
This project is licensed under the [MIT license].
3434

35-
[mit license]: https://github.com/DioxusLabs/dioxus/blob/master/LICENSE-MIT
35+
[mit license]: https://github.com/dioxuslabs/dioxus/blob/main/LICENSE-MIT
3636

3737
Unless you explicitly state otherwise, any contribution intentionally submitted
3838
for inclusion in Dioxus by you shall be licensed as MIT without any additional

0 commit comments

Comments
 (0)