Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Link check sources as well
  • Loading branch information
thomas-zahner committed Nov 7, 2025
commit fdb3c68f36f189d82a15cd0d7b76ee39ab71edf9
25 changes: 6 additions & 19 deletions .github/workflows/check-pr-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,12 @@ jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20"
- uses: actions/checkout@v5

- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Build site
uses: withastro/action@v5
with:
version: latest

- name: Install dependencies for feature branch
run: pnpm install --frozen-lockfile

- name: Build site from feature branch
run: pnpm build
package-manager: pnpm@latest

- name: Check links
uses: lycheeverse/lychee-action@v2
Expand All @@ -38,7 +24,8 @@ jobs:
--root-dir $PWD/dist
--exclude-all-private
--remap 'https://lychee\.cli\.rs/(.*)/ file://'$PWD'/dist/$1/index.html'
dist
dist/
src/
fail: true

- name: Suggestions
Expand Down
4 changes: 4 additions & 0 deletions .lycheeignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ https://www.nongnu.org/atool

# 404 page is directly in dist/404.html but we've remapped it to an invalid path
dist/404/index.html$

# Code examples in base-url.mdx which don't exist
/docs/about.php$
/docs/recipes/guide.php$
12 changes: 6 additions & 6 deletions src/content/docs/recipes/base-url.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ Here's what happens to different types of links:

<Code
code={`<!-- Original links -->
<a href="./guide.html">Guide</a>
<a href="../about.html">About</a>
<a href="https://other.com">External</a>
<a href="./guide.php">Guide</a>
<a href="../about.php">About</a>
<a href="https://example.com">Absolute</a>

<!-- After --base-url https://example.com/docs/ -->

<a href="https://example.com/docs/guide.html">Guide</a>
<a href="https://example.com/about.html">About</a>
<a href="https://other.com">External</a>`} lang={fileLang}
<a href="https://example.com/docs/guide.php">Guide</a>
<a href="https://example.com/about.php">About</a>
<a href="https://example.com">Absolute</a>`} lang={fileLang}
title="Link Resolution Example" />

## Common Use Cases
Expand Down