Skip to content

Commit

Permalink
Merge pull request #305 from DeterminateSystems/link-checker-pt2
Browse files Browse the repository at this point in the history
Add external link checking
  • Loading branch information
lucperkins authored Dec 18, 2023
2 parents 437dc0e + 26dff26 commit 483b95e
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,35 @@ jobs:
test:
environment: test
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: git checkout
uses: actions/checkout@v3
- name: Check Nixpkgs input
uses: DeterminateSystems/flake-checker-action@main
with:
fail-mode: true
- name: Restore Lychee cache
uses: actions/cache@v3
with:
path: .lycheecache
key: lychee-link-check
restore-keys: cache-lychee-
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Run Nix CI suite
run: nix develop --command ci
- name: Check external links
uses: lycheeverse/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >-
--cache
--verbose
--no-progress
./dist
fail: true
- name: Check flake templates
run: ./scripts/check-flake-templates.sh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ result
# htmltest artifacts
/tmp/

# Lychee cache
.lycheecache

# îles artifacts
/.iles-ssg-temp/
/dist/
Expand Down
2 changes: 1 addition & 1 deletion components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ declare module '@vue/runtime-core' {
IconFaSolidMoon: typeof import('~icons/fa-solid/moon')['default']
IconFaSolidSun: typeof import('~icons/fa-solid/sun')['default']
IconFaWarning: typeof import('~icons/fa/warning')['default']
Island: typeof import('./node_modules/.pnpm/[email protected]_@types+node@18.18.6_typescript@5.2.2/node_modules/iles/dist/client/app/components/Island.vue')['default']
Island: typeof import('./node_modules/.pnpm/[email protected]_@types+node@18.19.3_typescript@5.3.3/node_modules/iles/dist/client/app/components/Island.vue')['default']
Language: typeof import('./src/components/mdx/stateful/Language.vue')['default']
Languages: typeof import('./src/components/mdx/stateful/Languages.vue')['default']
Modal: typeof import('./src/components/layout/Modal.vue')['default']
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@

# Link checking
htmltest
lychee

# JS
nodejs
Expand Down
3 changes: 3 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
exclude = [
'https://github.com\.*',
] # TODO: remove this when we figure out a way around GitHub's rate limits
8 changes: 0 additions & 8 deletions src/pages/concepts/channels.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@ snippet: |
Nix's original but no longer recommended system for discovering and depending on [Nix expressions](/concepts/nix-language)
related: ["flakes", "pinning"]
externalSources: [
{
title: "Channels",
href: "https://nixos.org/manual/nix/stable/package-management/channels",
source: {
title: "The Nix manual",
href: "https://nixos.org/manual/nix/stable"
}
},
{
title: "Nix channels",
href: "https://nixos.wiki/wiki/Nix_channels",
Expand Down
4 changes: 2 additions & 2 deletions src/pages/start/8.learn-more.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ Another powerful Nix feature is that you can use it to build [OCI]-compliant con
},
{
title: "Home Manager configuration options",
href: "https://rycee.gitlab.io/home-manager/options",
href: "https://nix-community.github.io/home-manager/options.xhtml",
source: {
title: "The Home Manager manual",
href: "https://rycee.gitlab.io/home-manager"
href: "https://nix-community.github.io/home-manager",
}
}
]} client:load />
Expand Down

1 comment on commit 483b95e

@vercel
Copy link

@vercel vercel bot commented on 483b95e Dec 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.