From ffcff29edf223a04d9cd2a0c39b26f558f512081 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Sun, 7 Jan 2024 16:16:39 +0100 Subject: Fix modrinth urls + add organization / user support --- apps/website/config.ts | 5 ++++- apps/website/src/pages/mods.astro | 12 +++++++----- apps/website/src/types/Config.d.ts | 5 ++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/apps/website/config.ts b/apps/website/config.ts index 45d9dac..cb4e515 100644 --- a/apps/website/config.ts +++ b/apps/website/config.ts @@ -7,7 +7,10 @@ export const configConst = { youtube: 'https://youtube.com/@Polyfrost', discord: '/discord', github: 'https://github.com/Polyfrost', - modrinthId: 'polyfrost', + modrinth: { + id: 'polyfrost', + type: 'organization', + }, skyclient: 'https://skyclient.co', }, navbar: { diff --git a/apps/website/src/pages/mods.astro b/apps/website/src/pages/mods.astro index 4f4e60a..69e57f9 100644 --- a/apps/website/src/pages/mods.astro +++ b/apps/website/src/pages/mods.astro @@ -9,7 +9,9 @@ import configConst from '@config'; import Layout from '@layouts/Layout.astro'; import { Code } from 'astro:components'; -const modrinthId = configConst.socials.modrinthId; +const modrinthId = configConst.socials.modrinth.id; +const modrinthType = configConst.socials.modrinth.type; +const modrinthUrl = `https://modrinth.com/${modrinthType}/${modrinthId}`; --- @@ -43,7 +45,7 @@ const modrinthId = configConst.socials.modrinthId;
Redefining modding, one mod at a time
- +
@@ -134,7 +136,7 @@ const modrinthId = configConst.socials.modrinthId;
Get our mods, available on Modrinth and GitHub.
- +
@@ -142,10 +144,10 @@ const modrinthId = configConst.socials.modrinthId; -