gitbook-redirects

Generates a GitBook redirect CSV for renamed, moved, split, or retired documentation pages.

28|115|Updated Jan 28, 2025
One-click install
npx skills add https://github.com/mariadb-corporation/mariadb-docs --skill gitbook-redirects-mariadb-corporation
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gitbook-redirects
Source: https://github.com/mariadb-corporation/mariadb-docs/tree/main/.claude/skills/gitbook-redirects
Command: npx skills add https://github.com/mariadb-corporation/mariadb-docs --skill gitbook-redirects-mariadb-corporation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When MariaDB documentation pages are renamed, moved, split, or retired, their old published URLs dead-end because the docs repository has no built-in redirect mechanism. This Skill produces the GitBook redirect CSV that a site admin imports manually so old links keep working. ## Core Features & Use Cases - Old-to-new pair collection: Gathers every retired or moved page from the task, PR diff, or git log --diff-filter=D, including retired section landing pages. - Path derivation rules: Converts old URLs to site-relative source paths (dropping .md, mapping README.md to its directory) and new pages to full absolute https://mariadb.com/docs/server/... destination URLs, handling slug quirks like -1 suffixes. - CSV output with guardrails: Writes a source,destination CSV outside the repo for manual import in GitBook Settings → Redirects, and documents the two common import failure modes. - Use Case: After a DOCS-XXXX consolidation retires several pages, run this Skill to produce the redirect CSV covering every removed leaf and landing page, then hand it to a GitBook site admin for import. ## Quick Start Create a GitBook redirects CSV for the pages that were moved or retired in this branch.

Frequently Asked Questions about gitbook-redirects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitBook redirects CSV for moved documentation pages?▼

Collect every old-to-new page pair from the task or PR diff, convert old paths to site-relative sources and new pages to full absolute URLs, then write a CSV with the exact header source,destination. A GitBook site admin imports it under Settings → Redirects.

How to find deleted pages in a git branch for redirects?▼

Run git log --diff-filter=D --name-only on the branch to list files removed by the restructuring. Include retired section and landing pages too, pointing each at the nearest surviving landing page, not just leaf pages.

Can GitBook redirects be set up via API or automatically?▼

No, GitBook redirects for this docs site are configured manually in the site UI with no API or MCP path. The deliverable is the CSV file, which a site admin imports through GitBook Settings → Redirects.

Why does GitBook CSV import fail with Invalid destination URL?▼

The Invalid destination URL error means a destination is not a full absolute URL; every destination must start with https://mariadb.com/docs/server/. A header error means the first row is not exactly source,destination.

Should the redirect CSV be committed to the docs repository?▼

No, the CSV is a working file written outside the repo and is never committed. In-repo inbound links to retired pages must still be repointed separately, since redirects do not cover internal link breakage.