Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report broken links #1116

Merged
merged 5 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
_site
_cache
_broken_links.json

.idea

Expand Down
8 changes: 8 additions & 0 deletions _config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import redirects from "lume/plugins/redirects.ts";
import search from "lume/plugins/search.ts";
import sitemap from "lume/plugins/sitemap.ts";
import postcss from "lume/plugins/postcss.ts";
import checkUrls from "lume/plugins/check_urls.ts";

import tw from "tailwindcss";
import tailwindConfig from "./tailwind.config.js";
Expand Down Expand Up @@ -247,6 +248,13 @@ site.ignore(
);

site.scopedUpdates((path) => path == "/overrides.css");
site.use(checkUrls({
external: false, // Set to true to check external links
output: "_broken_links.json",
ignore: [
"https://www.googletagmanager.com",
],
}));

site.remoteFile(
"orama.css",
Expand Down
14 changes: 10 additions & 4 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@
"imports": {
"@std/fs": "jsr:@std/fs@^0.229.3",
"ga4": "https://raw.githubusercontent.com/denoland/ga4/04a1ce209116f158b5ef1658b957bdb109db68ed/mod.ts",
"lume/": "https://deno.land/x/lume@v2.3.3/",
"lume/": "https://deno.land/x/lume@v2.4.1/",
"tailwindcss": "npm:tailwindcss@^3.4.9",
"@orama/wc-components/": "https://unpkg.com/@orama/[email protected]/"
},
"tasks": {
"build": "deno run -A lume.ts",
"serve": "deno run -A lume.ts -s",
"prod": "cd _site && deno run --allow-read=. --allow-net server.ts",
"reference": "cd reference_gen && deno task types && deno task doc"
"reference": "cd reference_gen && deno task types && deno task doc",
"lume": "echo \"import 'lume/cli.ts'\" | deno run -A -"
},
"compilerOptions": {
"types": ["lume/types.ts"],
"types": [
"lume/types.ts"
],
"jsx": "precompile",
"jsxImportSource": "npm:preact"
},
"exclude": ["_site", "reference_gen"]
"exclude": [
"_site",
"reference_gen"
]
}
Loading