Skip to content

Include srcDir in the source path reported by dead links plugin #4919

@adiroiban

Description

@adiroiban

I have a site configured as

export default defineConfig({
    srcDir: 'content',

When there in dead link detect in the file content/product/roadmap.md the report is

(!) Found dead link /articles/tag-release-1 in file product/roadmap.md

It would be nice to have the full path to the source file

I think that the affected code is this one

renderStart() {
if (allDeadLinks.length > 0) {
allDeadLinks.forEach(({ url, file }, i) => {
siteConfig.logger.warn(
c.yellow(
`${i === 0 ? '\n\n' : ''}(!) Found dead link ${c.cyan(
url
)} in file ${c.white(c.dim(file))}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions