.agents/skills/learn-site-structure/recipes/move-doc-page.md
Move a page from one sidebar location to another. The source
file stays where it is; only its position in map.yaml
changes. Ingest auto-generates a redirect from the old URL to
the new one.
Confirm the page is a regular doc (.md), not an integration
page. Integration pages flow through the integrations
pipeline; their position is driven by their meta.categories,
not by map.yaml. To move an integration page, you change
the integration's category in its metadata.yaml (see the
integrations-lifecycle skill).
Open <repo>/docs/.map/map.yaml.
meta.edit_url UNCHANGED -- it still points to the
same source file.meta.label if the new location calls
for a different display name (this changes the URL slug
too -- in that case it's effectively also a rename).cd ${NETDATA_REPOS_DIR}/learn
. venv/bin/activate
python3 ingest/ingest.py --local-repo netdata:<repo> \
--ignore-on-prem-repo --fail-links-netdata
Check:
netlify.toml and
LegacyLearnCorrelateLinksWithGHURLs.json from the old URL
to the new target.grep -A1 "<old-url>" netlify.toml LegacyLearnCorrelateLinksWithGHURLs.json
Single map.yaml change. The source .md file is unchanged.
Same as add-doc-page: 0-3 hour cron + ingest PR + manual merge + Netlify deploy. The auto-generated redirect ships with the ingest PR.
After deploy:
curl -sI https://learn.netdata.cloud<old-path>
# Expect: HTTP/2 301
# Location: https://learn.netdata.cloud<new-path>
Auto-redirect is via the GitHub blob URL, not via the
old Learn URL directly. The catalog is anchored to
github.com/netdata/netdata/blob/master/<source-path> so
multiple consecutive moves keep working as long as the
source file still exists.
If you also rename the file in source, treat that as a
separate move + you must update meta.edit_url. The diff
mechanism still works because the OLD meta.edit_url value
is what gets stored as the redirect's GH URL key.
slug: overrides bypass the diff mechanism. If the
page has a frontmatter slug:, moving the map.yaml row
does NOT change the URL, so no redirect is generated. To
move a slug-override page, edit the slug AND ensure a
manual entry lands in
LegacyLearnCorrelateLinksWithGHURLs.json (similar to the
delete recipe).
meta.edit_url when only moving. The edit_url
should NOT change for a move (the source file stays put).meta.edit_url. Will produce
validation failures because the schema regex requires the
edit_url to match an existing source file.