Skip to content
duxt

Move a page

redirectFrom in the frontmatter, turned into route rules under every prefix.

A moved page is the one broken link a documentation site creates for itself. Put the old URL in the frontmatter of the new page, and the redirect ships in the same commit as the move.

Steps

  1. Move the file and rename it as you meant to.
  2. List the old paths on the page itself, without any prefix:
    ---
    title: Deploy a site
    description: Where a duxt site can run.
    redirectFrom:
      - /getting-started/deploy
      - /deployment
    ---
    
  3. Rebuild. The build turns each entry into route rules — under every repository, version and locale prefix the page is served at.
  4. Check one of them, prefix included, in the built site.

Why the frontmatter is the right place

The fix has always lived outside the site: an nginx rule, a Netlify _redirects file, a Cloudflare list — written by whoever deploys the site and never by whoever moved the page. And only the layer can solve it once, because only the resolved manifest knows which prefixes exist; a consumer writing the rules by hand would have to rediscover the whole scheme per page.

Checklist

  • Every old path is listed, written without a prefix
  • The build reports no broken internal link
  • An old URL redirects under the version prefix too, not just bare
  • Nothing was added to the web server's configuration
Was this page helpful?