Command

bengal.utils.codemod.urls

Migrate URL properties from old naming to new href/_path convention.

Replaces:

  • .url → .href (but NOT source_url, canonical_url, etc.)
  • .relative_url → ._path
  • .site_path → ._path
  • .permalink → .href

Usage

bengal.utils.codemod.urls [OPTIONS]

Options

Option Type Description
--diff flag BOOLEAN

Show unified diff of changes

--dry-run flag BOOLEAN

Preview changes without modifying files

--path, -p required DIRECTORY

Directory path to process (recursively)

Examples

    bengal codemod-urls --path site/themes/ --dry-run
    bengal codemod-urls --path site/themes/ --diff
    bengal codemod-urls --path site/themes/