question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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!

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:18 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
Anonymitaetcommented, Oct 21, 2022

OK. But all the reference-configuration.md is 404… I think we should do something to optimize it.

FYI: https://github.com/apache/pulsar/pull/18132/files#diff-2f6afd23b9f4fddf8ea934eb85c62599f7d05e01bb457cbabc2a178cd92ddab9 is adding reference-configuration.md back

CC @SignorMercurio

2reactions
tisonkuncommented, Oct 24, 2022

@Anonymitaet yes. I think that we should retain the URL /docs/<path> for convenience and current usage, but it helps to serve it as an alias.

That is, the source of truth is /docs/<latest-version>/<path> and we set up /docs/<content> as an alias to the latest stable versioned one. In this way, users can use /docs/<path> to access the latest stable version (which can be changed), while where there needs an immutable link, it uses /docs/<latest-version>/<path>.

I think this should be done in the building stage. And let’s move the discussion to #17438 instead of polluting this thread 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Improve DocOps using CI/CD and Docs-as-Code
In this article we explain the basic principles of Docs-as-Code and DocOps, and showcase an actual toolchain to get started with CI/CD and ......
Read more >
Use CI to Automatically Catch Dead Links in Your GitHub Project
Automate out your margin of error by using Circle CI to catch dead links in Git.
Read more >
CI/CD check to check for broken links · Issue #1621 - GitHub
Broken links ain't fun. Since the entire site is auto-generated, we can check for broken links when the site is being built in...
Read more >
CI/CD concepts - GitLab Docs
An overview of Continuous Integration, Continuous Delivery, and Continuous Deployment, as well as an introduction to GitLab CI/CD.
Read more >
CI/CD Pipeline: A Gentle Introduction - Semaphore
A CI/CD pipeline helps you automate steps in your software delivery process. Understand the basics, best practices and how to get started.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found