Skip to content
Gx
GitHub

GX8003: content link or anchor is broken

A link in a content file points at a page or a heading that does not exist.

Cause

A link in a content file points at a page or a heading that does not exist. gx check --external-links also requests each http and https link.

Example

content/docs/start.md
---
title: Start
---

# Start

Read the [setup guide](/setup/) next.
site/site.go
package site

import "github.com/alternayte/gx"

// Meta is the frontmatter of one page.
type Meta struct {
	Title string `yaml:"title"`
}

// Docs is the docs collection.
var Docs = gx.Collection[Meta]("content/docs")

gx check reports:

gx check
content/docs/start.md:7:11: GX8003: link "/setup/" points at no page

Fix

  1. Correct the path or the anchor.
  2. Or add the page or the heading that is missing.