Skip to content

Ensure links are correct after change to markdown format #2095

Closed

Description

@mrjones-plip

When #2017 was merged, it unintentionally changed some links by blindling changing it from ({{ref "PAGE"}}) to /PAGE.

For example, the old link of [CHT Core Framework]({{< ref "core" >}} goes to Contributing CHT Core Code (/community/contributing/code/core/). Then this was converted to [CHT Core Framework](/core), which incorrectly goes to Concepts and paradigms of the CHT (/technical-overview/concepts/)

Hopefully there's not too many incidents of this, but we should double check to be sure starting with the one above which is on the Building page (see "using the CHT Core Framework").

Huge shout out to @cliftonmcintosh who found this while working on #2069

Activity

  1. gmarav05 commented on Mar 23, 2026

    @gmarav05
    Contributor

    Hello @andrablaj, I investigated this issue by searching the codebase for the broken link pattern described.

    The specific broken link mentioned ([CHT Core Framework](/core)) no longer exists in the codebase. I also searched for other short internal paths that might have been incorrectly converted, and all remaining internal links appear to be valid.

    The remaining {{< relref and {{< see-also shortcodes are valid Hugo shortcodes and are not affected by the original conversion.

  2. andrablaj commented on Mar 23, 2026

    @andrablaj
    Member

    cc @mrjones-plip - are you available to support with @gmarav05's findings? Thank you!

  3. mrjones-plip commented on Mar 24, 2026

    @mrjones-plip
    ContributorAuthor

    Thanks @andrablaj ! And thanks for the effort to validate the links @gmarav05 - that's awesome!

    However, I'm not sure if your checks are effective. Looking at the example link (/core), it was valid before and valid now in that it has always returned a 200:

    $ curl -o /dev/null -s -w "%{http_code}\n" https://docs.communityhealthtoolkit.org/core/
    
    200
    

    The reason it was broken (or "not correct") was that /core used to hold other content (see left side below from archive.org) but now it holds different content (see right side)

    Image

    This ticket is especially tricky in that searching for short internal paths programmatically and checking they return a 200 doesn't verify they're contextually correct, just that they're not 404.

    I suspect we shouldn't put a huge effort into this ticket , but instead maybe just spot check our top level pages by spending 10 or 15 min clicking around ensuring the link matches the destination?

  4. added 3 commits that reference this issue on Mar 25, 2026
  5. gmarav05 commented on Mar 25, 2026

    @gmarav05
    Contributor

    @mrjones-plip Thanks for pointing it out i found two links and raised my PR fixing them. I followed your advice to find them. I was able to find them just by manually clicking few links. It took only 15 mins to find them out. thanks once again for the advice.

    1. Building page - [CHT Core Framework] was pointing to /building/local-setup instead of /technical-overview/architecture/cht-core.

    2. Architecture page - CHT Watchdog card was pointing to cht-conf instead of cht-watchdog.

    3. /core alias - was duplicated across three files (architecture/_index.md, concepts/_index.md, technical-overview/_index.md) causing /core to incorrectly resolve to "Concepts and paradigms of the CHT" instead of the CHT Core Framework page. Moved the alias exclusively to cht-core.md.

  6. added a commit that references this issue on Mar 25, 2026
  7. mrjones-plip commented on Mar 25, 2026

    @mrjones-plip
    ContributorAuthor

    Perfect - thanks @gmarav05 - this worked a treat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions