-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
help wantedExtra attention is neededExtra attention is needed
Description
Hello, I am looking for help to get textlint
to verify my website's relative links within my HUGO website.
Any help would be greatly appreciated!
Thanks ~
Goal
- We have a HUGO website that supports multi-language content
- We use a language subdirectory (
example.com/en/content
) - We want to enable
textlint
to verify relative links with thebaseURL
with the language subdirectory. (Specifically English's/en/
)
Problem
- We have included the language tag in the
baseURI
, but it seems to be ignored.- Our settings:
"baseURI": "https://example.com/en/",
textlint
acts as if ourbaseURI
is onlyhttps://example.com/
.
- Our settings:
- Incorrect links are being tested and returned as 404 dead links.
- Instead of
https://example.com/en/blog1
, it testshttps://example.com/blog1
and returns 404.
- Instead of
Our configurations in .textlintrc
{
"rules": {
"prh": {
"rulePaths": ["../../rules/global/prh.yml"]
},
"@textlint-rule/require-header-id": true,
"@textlint-rule/no-invalid-control-character": true,
"no-dead-link": {
"checkRelative": true,
"baseURI": "https://example.com/en/",
"checkRelative": false,
"baseURI": null,
"ignore": [
"https://example.com/**",
"https://api.example.com/**",
"https://www.linkedin.com/**",
"https://github.com/**"
],
"preferGET": [],
"ignoreRedirects": true,
"retry": 3,
"userAgent": "textlint-rule-no-dead-link/1.0",
"maxRetryTime": 10
}
},
"filters": {
"allowlist": {
"allow": [
"product: example"
],
"allowlistConfigPaths": [
"../../rules/allow.yml"
]
},
"comments": true
}
}
Related Issue
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is needed