Skip to content

Scheme-less links (e.g. twitter.com/jeffhicks) render as broken relative links #22

Description

@HeyItsGilbert

Reported during the link/rendering review in #19.

Problem

Some links in migrated content are missing their https:// scheme, so Hugo/Goldmark treats them as site-relative paths and they 404. Confirmed examples:

  • content/articles/2013-04-22-meet-the-scripting-games-judges-jeffery-hicks.mdTwitter at twitter.com/jeffhicks (bare, scheme-less)
  • content/articles/2013-02-16-phillyposh-02072013-meeting-summary-and-presentation-materials.md — reference def [6]: twitter.com/jeffhicks

A malformed variant also exists elsewhere in migrated content: http:/gplus.to/jeffhicks (single slash). It's worth sweeping for both patterns.

To find candidates

# scheme-less reference defs and inline links to external hosts
grep -rnE '\]\(([a-z0-9.-]+\.(com|org|net|io)/)' content/ | grep -vE 'https?://'
grep -rnE '\]:\s*([a-z0-9.-]+\.(com|org|net|io)/)' content/ | grep -vE 'https?://'
# malformed single-slash scheme
grep -rnE 'https?:/[^/]' content/

Suggested fix

  • Add the missing https:// (or http:// where appropriate) scheme.
  • Repair single-slash http:/http://.

Acceptance

  • The known examples resolve to the intended external URLs; a sweep finds no remaining scheme-less external links.

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