sort-redirects

Sort redirect entries in Open Publishing redirection JSON files alphabetically by path. This ensures consistency and makes the redirect files easier to maintain.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "sort-redirects" with this command: npx skills add dotnet/docs/dotnet-docs-sort-redirects

Sort Redirects

Sort redirect entries in Open Publishing redirection JSON files alphabetically by path. This ensures consistency and makes the redirect files easier to maintain.

When to Use

  • After adding redirect entries to a JSON file

  • When the redirect file has become unsorted

  • After merging branches that may have caused unsorted entries

Steps

  • Identify the redirection file - Determine which .openpublishing.redirection.*.json file needs sorting.

  • Run the sort script - Use the sort-redirects.ps1 script with the file path.

Scripts

sort-redirects.ps1

Sorts all entries in the JSON file alphabetically by path (ignoring leading / for source_path_from_root ). Handles both source_path_from_root and source_path properties.

Location (relative to this skill file): ./scripts/sort-redirects.ps1

Parameter Required Description

RedirectionFile

Yes The path to a redirection JSON file (e.g., .openpublishing.redirection.csharp.json )

Example:

.\scripts\sort-redirects.ps1 -RedirectionFile ".openpublishing.redirection.csharp.json"

Important Notes

  • The script preserves all existing redirect entries, only changing their order.

  • Sorting is case-sensitive and alphabetical by the normalized path (without leading / ).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

redirect-article

No summary provided by upstream source.

Repository SourceNeeds Review
General

mintlify

No summary provided by upstream source.

Repository SourceNeeds Review
General

dotnet

No summary provided by upstream source.

Repository SourceNeeds Review