Skip to content

How to Rename Categories

Tiago Araújo [SSW] edited this page Jul 17, 2023 · 14 revisions

Renaming SSW Categories and their URLs

Let's say we want to rename the category "Rules to Better ChatGPT Prompt Engineering" to "Rules to Better ChatGPT Prompting". This is how you would do so:

Step 1: Update the frontmatter fields

  1. Open the category in GitHub and click the 'Edit' button Edit button in GitHub Figure: Open the Editor in GitHub

  2. Change the title: field in the frontmatter

  3. Change the uri: field in the frontmatter

  4. Add the old URI to the redirects: list

For example, change from:

---
type: category
title: Rules to Better ChatGPT Prompt Engineering
guid: 91b60efc-2b8e-4ff1-a373-ac4cab576483
uri: rules-to-better-chatgpt-prompt-engineering
index:
---

To:

---
type: category
title: Rules to Better ChatGPT Prompting
guid: 91b60efc-2b8e-4ff1-a373-ac4cab576483
uri: rules-to-better-chatgpt-prompting
redirects: 
 - rules-to-better-chatgpt-prompt-engineering
index:
---

Step 2: Rename the file in GitHub

  1. Click and change the file name at the top of the editor Folder name editor Figure: Pressing 'backspace' will move the editor field to the folder

    For example, change from path:
    categories/artificial-intelligence/rules-to-better-chatgpt-prompt-engineering.md

    To:
    categories/artificial-intelligence/rules-to-better-chatgpt-prompting.md

  2. Once done, commit your changes as a normal PR Pressing 'Commit changes...' to save the changes Figure: Pressing 'Commit changes...' to save the changes

Step 3: Find and update category path in the top category file

To find the top category (E.g. Artificial Intelligence) the rule is in, then follow these steps:

  1. Navigate to the index.md file within the categories folder
  2. Click the edit pencil
  3. Find the old URI in the index and change it to the new one
Clone this wiki locally