Skip to content

[Doc][improve] Auto-detect broken links and integrate into CI process #18026

Description

@labuladong

Search before asking

  • I searched in the issues and found nothing similar.

What issue do you find in Pulsar docs?

After #17495 and #17599, we can see many broken links in the Pulsar document. And more links may break during further evolution.

What is your suggestion?

In #17599 I use a script but it's not reliable enough so I have to check the links list manually. I suggest developing a reliable script to auto-detect the incorrect links in the Pulsar document. Maybe we can integrate this script into the CI process which is related to document change.

Before development, I'd like to enumerate all kinds of broken links.

1. wrong markdown file reference

For example the link of this page:

image

The markdown content is [configuration](reference-configuration.md), but the reference-configuration.md file not exists.

2. 404 URL path

For example the link of this page:

image

The markdown content is [type](/api/client/index.html?org/apache/pulsar/client/api/CompressionType.html), but the Pulsar site doesn't have this path.

3. confusing URL path

For example the link of this page:

image

The markdown content is [Pulsar Functions CLI](/tools/pulsar-admin/), but this refers to a confusing page:

image

4. invalid title anchor

We can use # to refer to a specific block of HTML this way: [dataDir](reference-configuration.md#zookeeper-dataDir). So if our script can detect the anchor will be better.

Our script should be able to detect these broken links and print warning messages to users.

cc @tisonkun @Anonymitaet @momo-jun @michaeljmarshall

Any reference?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

doc-requiredYour PR changes impact docs and you will update later.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions