diff --git a/contributing.md b/contributing.md
index ba8c7b2a7..534393574 100644
--- a/contributing.md
+++ b/contributing.md
@@ -44,7 +44,7 @@ Visit the following resources to learn more:
- [@type@Description of link](Link)
```
-`@type@` can be one of the following:
+`@type@` must be one of the following and describes the type of content you are adding:
- `@official@`
- `@opensource@`
@@ -54,6 +54,8 @@ Visit the following resources to learn more:
- `@podcast@`
- `@video@`
+It's important to add a valid type, this will help us categorize the content and display it properly on the roadmap.
+
## Guidelines
-
Adding everything available out there is not the goal!
diff --git a/src/components/TopicDetail/TopicDetail.tsx b/src/components/TopicDetail/TopicDetail.tsx
index 02863edf6..af668a758 100644
--- a/src/components/TopicDetail/TopicDetail.tsx
+++ b/src/components/TopicDetail/TopicDetail.tsx
@@ -52,11 +52,11 @@ const linkTypes: Record = {
course: 'bg-green-400',
opensource: 'bg-black text-white',
'roadmap.sh': 'bg-black text-white',
- 'roadmap': 'bg-black text-white',
+ roadmap: 'bg-black text-white',
podcast: 'bg-purple-300',
video: 'bg-purple-300',
website: 'bg-blue-300',
- 'official': 'bg-blue-600 text-white',
+ official: 'bg-blue-600 text-white',
};
export function TopicDetail(props: TopicDetailProps) {
@@ -190,22 +190,30 @@ export function TopicDetail(props: TopicDetailProps) {
const otherElems = topicDom.querySelectorAll('body > *:not(h1, div)');
- const listLinks = Array.from(
- topicDom.querySelectorAll('ul > li > a'),
- ).map((link, counter) => {
- const typePattern = /@([a-z]+)@/;
- let linkText = link.textContent || '';
- const linkHref = link.getAttribute('href') || '';
- const linkType = linkText.match(typePattern)?.[1] || 'article';
- linkText = linkText.replace(typePattern, '');
+ const listLinks = Array.from(topicDom.querySelectorAll('ul > li > a'))
+ .map((link, counter) => {
+ const typePattern = /@([a-z]+)@/;
+ let linkText = link.textContent || '';
+ const linkHref = link.getAttribute('href') || '';
+ const linkType = linkText.match(typePattern)?.[1] || 'article';
+ linkText = linkText.replace(typePattern, '');
- return {
- id: `link-${linkHref}-${counter}`,
- title: linkText,
- url: linkHref,
- type: linkType as AllowedLinkTypes,
- };
- });
+ return {
+ id: `link-${linkHref}-${counter}`,
+ title: linkText,
+ url: linkHref,
+ type: linkType as AllowedLinkTypes,
+ };
+ })
+ .sort((a, b) => {
+ // official at the top
+ // opensource at second
+ // article at third
+ // videos at fourth
+ // rest at last
+ const order = ['official', 'opensource', 'article', 'video'];
+ return order.indexOf(a.type) - order.indexOf(b.type);
+ });
const lastUl = topicDom.querySelector('ul:last-child');
if (lastUl) {
diff --git a/src/data/roadmaps/frontend/content/111-pick-a-framework/101-angular/index.md b/src/data/roadmaps/frontend/content/111-pick-a-framework/101-angular/index.md
index e7c8f9c8d..cf1bd1039 100644
--- a/src/data/roadmaps/frontend/content/111-pick-a-framework/101-angular/index.md
+++ b/src/data/roadmaps/frontend/content/111-pick-a-framework/101-angular/index.md
@@ -6,4 +6,4 @@ Visit the following resources to learn more:
- [@roadmap@Visit Dedicated Angular Roadmap](/angular)
- [@official@Official - Getting started with Angular](https://angular.io/start)
-- [@video@Angular for Beginners Course [Full Front End Tutorial with TypeScript]](https://www.youtube.com/watch?v=3qBXWUpoPHo)
+- [@video@Angular for Beginners Course](https://www.youtube.com/watch?v=3qBXWUpoPHo)
diff --git a/src/data/roadmaps/frontend/content/114-css-frameworks/114-js-first/103-shadcn-ui.md b/src/data/roadmaps/frontend/content/114-css-frameworks/114-js-first/103-shadcn-ui.md
index 81071ae4e..d9a63b865 100644
--- a/src/data/roadmaps/frontend/content/114-css-frameworks/114-js-first/103-shadcn-ui.md
+++ b/src/data/roadmaps/frontend/content/114-css-frameworks/114-js-first/103-shadcn-ui.md
@@ -2,5 +2,5 @@
Shadcn UI are beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source. They are built with Tailwind CSS and Radix UI.
-- [@article@Official Website](https://ui.shadcn.com/)
+- [@official@Official Shadcn UI Website](https://ui.shadcn.com/)
- [@opensource@Official GitHub Repository](https://github.com/shadcn-ui/ui)
\ No newline at end of file