Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
3 changes: 3 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ export default defineNuxtConfig({
'/': { prerender: true },
'/200.html': { prerender: true },
'/about': { prerender: true },
'/compare': { prerender: true },
'/privacy': { prerender: true },
'/search': { isr: false, cache: false }, // never cache
'/settings': { prerender: true },
Expand Down Expand Up @@ -219,6 +220,8 @@ export default defineNuxtConfig({

htmlValidator: {
enabled: !isCI || (provider !== 'vercel' && !!process.env.VALIDATE_HTML),
ignore:
!isCI || (provider !== 'vercel' && !!process.env.VALIDATE_HTML) ? ['/compare'] : undefined,
Comment thread
serhalp marked this conversation as resolved.
Outdated
failOnError: true,
},

Expand Down
22 changes: 22 additions & 0 deletions patches/@nuxtjs__html-validator@2.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/dist/module.mjs b/dist/module.mjs
index 62bb9c885e18652f48f6c067258f3ad70582b1f5..eb62642ba197cb7070708bdd01d733a790fb7d6f 100644
--- a/dist/module.mjs
+++ b/dist/module.mjs
@@ -82,7 +82,7 @@ const module = defineNuxtModule({
}
if (!nuxt.options.dev) {
const validatorPath = await resolvePath(fileURLToPath(new URL("./runtime/validator", import.meta.url)));
- const { useChecker, getValidator } = await (isWindows ? import(pathToFileURL(validatorPath).href) : import(validatorPath));
+ const { useChecker, getValidator, isIgnored } = await (isWindows ? import(pathToFileURL(validatorPath).href) : import(validatorPath));
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
const validator = getValidator(options);
const { checkHTML, invalidPages } = useChecker(validator, usePrettier, logLevel);
if (failOnError) {
@@ -98,7 +98,7 @@ const module = defineNuxtModule({
if (!route.contents || !route.fileName?.endsWith(".html")) {
return;
}
- if (route.contents.match(NuxtRedirectHtmlRegex)) {
+ if (route.contents.match(NuxtRedirectHtmlRegex) || isIgnored(route.route, moduleOptions.ignore)) {
return;
}
checkHTML(route.route, route.contents);
7 changes: 5 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ packageExtensions:

patchedDependencies:
'@jsr/deno__doc@0.189.1': patches/@jsr__deno__doc@0.189.1.patch
'@nuxtjs/html-validator@2.1.0': patches/@nuxtjs__html-validator@2.1.0.patch
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated

savePrefix: ''

Expand Down
Loading