Skip to content

Commit 0b7f980

Browse files
authored
feat: check all the link & fragments (#127)
Some 404 images are removed since I don't know what they are referring to. cc @gaocegege Notes: - `lychee` cannot check the fragments that are generated by running JS - Some special characters in the header will not be recognized, it's better to specify the fragment manually like `## my: special.header {#use-this-as-fragment}` cc @cutecutecat - https://docs.gitlab.com/user/markdown/#heading-ids-and-links there is no standard --------- Signed-off-by: Keming <[email protected]>
1 parent 5057f6d commit 0b7f980

File tree

19 files changed

+54
-1745
lines changed

19 files changed

+54
-1745
lines changed

.github/workflows/check.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Typos check
1+
name: Check Typos and Links
22

33
on:
44
push:
@@ -10,11 +10,21 @@ on:
1010

1111
jobs:
1212
run:
13-
name: Spell Check with Typos
13+
name: Check Typos and Links
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout Actions Repository
1717
uses: actions/checkout@v4
1818

1919
- name: Check spelling of file.txt
2020
uses: crate-ci/typos@master
21+
22+
- name: Link Checker
23+
uses: lycheeverse/lychee-action@v2
24+
with:
25+
# exclude the blog since runner IPs are almost always blocked by HashNode
26+
args: --max-concurrency 8 --verbose --no-progress --exclude '^https://blog\.vectorchord\.ai' .
27+
fail: true
28+
format: markdown
29+
jobSummary: true
30+
lycheeVersion: nightly

lychee.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
fallback_extensions = ["md"]
2+
user_agent = "curl/8.1.2"
3+
include_fragments = true
4+
accept = [
5+
200,
6+
403, # forbidden, mainly for OpenAI
7+
999, # LinkedIn
8+
]
9+
remap = [
10+
"(https://github.com/[^/]+/[^/]+/blob/[^#]+)#[a-zA-Z0-9._-]* $1", # remove fragment from GitHub **blob** URLS
11+
"(https://github.com/[^/]+/[^/]+/tree/[^#]+)#[a-zA-Z0-9._-]* $1", # remove fragment from GitHub **main** URLS
12+
# `rewrites` from the `.vitepress/config.mts` file
13+
"([\\w]+)/vectorchord/usage/external-index-precomputation $1/vectorchord/usage/external-build",
14+
"([\\w]+)/vectorchord/usage/range-query $1/vectorchord/usage/similarity-filter",
15+
"([\\w]+)/vectorchord/usage/indexing-with-maxsim-operators $1/vectorchord/usage/multi-vector-retrieval",
16+
]

0 commit comments

Comments
 (0)