move-doc

Move documentation files with git mv and update Hugo aliases and links.

178|268|Updated Sep 21, 2017
One-click install
npx skills add https://github.com/pulumi/docs --skill move-doc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: move-doc
Source: https://github.com/pulumi/docs/tree/main/.claude/commands/move-doc
Command: npx skills add https://github.com/pulumi/docs --skill move-doc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complex process of moving documentation files while ensuring all necessary updates are made to maintain link integrity and discoverability.

Core Features & Use Cases

  • Safe File Movement: Moves markdown files and co-located assets using git mv to preserve history.
  • Automatic Alias Injection: Adds Hugo aliases to maintain old URL redirects.
  • Link & Menu Updates: Updates internal links and adjusts menu frontmatter for new locations.
  • Alias Verification: Runs repository scripts to confirm all redirects are functional.
  • Use Case: When reorganizing the documentation structure, use this Skill to move a guide from /docs/old-section/ to /docs/new-section/, automatically updating all internal references and ensuring users accessing the old URL are seamlessly redirected.

Quick Start

Use the move-doc skill to move the file 'content/docs/old/path/file.md' to 'content/docs/new/path/file.md'.

Frequently Asked Questions about move-doc

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

FAQPage Schema
How do I move Hugo documentation files in Git and keep all internal links working?

Moving Hugo documentation files in Git requires using `git mv` to preserve history, injecting Hugo aliases for old URL redirects, and updating internal links across directories. This maintains link integrity and discoverability during file migration.

What does Hugo alias injection do when reorganizing markdown content?

Hugo alias injection when reorganizing markdown content adds redirect rules to the moved file's frontmatter. This ensures that users accessing the old URL are seamlessly redirected to the new file location without breaking existing bookmarks.

Do I need specific build tools to automate documentation file migration?

Yes, automating documentation file migration requires Git, Hugo build tools, and specific Python or Bash scripts. These scripts handle file movement, verify alias redirects, and analyze the repository to update internal links and menu frontmatter.

How do I update menu frontmatter and internal links after moving a markdown file?

To update menu frontmatter and internal links after moving a markdown file, you run verification scripts that scan specified directories. These scripts automatically adjust menu configurations and rewrite internal references to point to the new path.

Can I preserve Git history when moving documentation and co-located assets?

You can preserve Git history when moving documentation and co-located assets by using the `git mv` command. This tracks the file movement in the repository history while the Skill handles subsequent link and metadata updates.

What is the best way to verify old URL redirects work after a documentation reorganization?

The best way to verify old URL redirects work after a documentation reorganization is to run repository alias verification scripts. These scripts check that all Hugo aliases function correctly before the changes are committed.