Appearance
How to Add a New Link to a Category
This document provides instructions on how to add a new link to an existing category on the TechLink Hub website.
Prerequisites
- You have a local copy of the website's source code.
- You have Node.js installed.
Instructions
Identify the Category: Determine which category the new link belongs to. The available categories are:
ai-machine-learning
cloud-infrastructure
cybersecurity-privacy
data-technologies
devops-sre
emerging-technologies
low-code-no-code
miscellaneous-concepts
software-engineering
web-development
Create a New Markdown File:
- Navigate to the
catalogue
directory. - Open the directory corresponding to the chosen category (e.g.,
catalogue/ai-machine-learning/
). - Create a new Markdown file (e.g.,
my-new-link.md
). The filename should be a URL-friendly "slug" of the link's title (e.g.,the-art-of-prompt-engineering.md
).
- Navigate to the
Add Frontmatter to the File:
- Open the new Markdown file and add the following frontmatter at the top:
yaml--- title: "The Title of the Link" date: "YYYY-MM-DD" description: "A brief description of the link." source: "https://example.com/the-link" tags: ["tag1", "tag2"] longDescription: "A longer, more detailed description of the link." relatedLinks: [ { title: "Related Link 1", url: "https://example.com/related1" }, { title: "Related Link 2", url: "https://example.com/related2" } ] --- The content of this markdown file will be displayed on the single link page.
title
: The title of the link.date
: The date the link was added, inYYYY-MM-DD
format.description
: A short, one-sentence description of the link's content.source
: The full URL of the link.tags
(optional): A list of relevant tags.longDescription
(optional): A longer, more detailed description of the link.relatedLinks
(optional): A list of related links, each with atitle
andurl
.
Update the Data File:
- Open a terminal in the root directory of the project.
- Run the following command to update the website's data file:
bashnode generate_data.mjs
Verify the Changes:
- Start the local development server and open your browser to the category page to verify that the new link is displayed correctly.