Open generalpiston opened 3 years ago
any update about that? I am interested to this me too. For international web sites I would make something like /es/*
Super confusing. If you pass a regex, it looks like they strip the leading slash before matching against the regex 🤯
@AleC77 I am also working with a localized site and I think I have it working. I'm using regexes and omitting the leading slash (due to the above quirk). So something like:
exclude: [
/^..\/some-path\/?$/, // exact path, with or without trailing slash (e.g. "/en/some-path" or "/en/some-path/")
/^..\/some-path.*/, // any path that starts with this (e.g. "/en/some-path" or "/en/some-path-here")
],
The
exclude
option is incredibly unintuitive. The examples look like the following:The above examples make it seem like
/dev-404-page
would either match a URI exactly or the beginning of it (ie./dev-404-page
would be rejected or/dev-404-page/.*
would be rejected).In reality, the following examples would be rejected:
That is really unintuitive.
Can it be an exact match? Or a start of URI match? Otherwise, can we add notes in the README?