| name | redirect-article |
| description | Deletes a markdown article and creates a redirect entry pointing to a different article. Use when consolidating articles, renaming or moving content, removing outdated documentation, or reorganizing the docs structure while preserving existing URLs. |
Redirect Article
Delete a markdown article from the repository and create a redirect entry that points users to a different article. This ensures existing links and bookmarks continue to work after content is reorganized.
When to Use
- Deleting an article that should redirect to another existing article
- Consolidating multiple articles into a single article
- Renaming or moving an article to a new location
- Removing outdated content while preserving URL functionality
Important Notes
- Redirect entries are sorted alphabetically by path (ignoring the leading
/ for source_path_from_root)
- Always determine the correct redirection file by searching for existing entries with similar paths before running the script
- Always search the repository for links to the old article and update them
- The
redirect_url shouldn't include the file extension or domain—just the URL path
Steps
1. Required: Use the provided script
DO NOT manually edit a redirection JSON file. Use the create-redirect-entry.ps1 script to handle the redirect creation automatically.
- Delete the source article - Remove the original markdown file from the repository using
Remove-Item
- Create a redirect entry - REQUIRED: Use the
create-redirect-entry.ps1 script (see below) to add the redirect entry to the appropriate JSON file. Do not manually edit the JSON file