From c06dbc468127f7cf7e0ed0ae36f28e177c80b7d8 Mon Sep 17 00:00:00 2001 From: Sid <114190535+KnowPa1n@users.noreply.github.com> Date: Tue, 28 Jul 2026 21:33:57 -0400 Subject: [PATCH 1/3] Links finna open in a new tab --- astro.config.mjs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/astro.config.mjs b/astro.config.mjs index f2875a6..2bc4246 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,10 +4,21 @@ import starlight from '@astrojs/starlight'; import starlightThemeGalaxy from 'starlight-theme-galaxy'; import starlightSidebarTopics from 'starlight-sidebar-topics'; import starlightLinksValidator from 'starlight-links-validator'; +import remarkExternalLinks from 'remark-external-links'; -// https://astro.build/config export default defineConfig({ site: 'https://beta.nextftc.dev', + markdown: { + remarkPlugins: [ + [ + remarkExternalLinks, + { + target: '_blank', + rel: ['noopener', 'noreferrer'], + }, + ], + ], + }, integrations: [ starlight({ title: 'NextFTC', @@ -73,4 +84,4 @@ export default defineConfig({ ] }), ], -}); +}); \ No newline at end of file From 78e993bdfae74a92da33c669364d182268c25301 Mon Sep 17 00:00:00 2001 From: Sid <114190535+KnowPa1n@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:04:15 -0400 Subject: [PATCH 2/3] switch to intellig hollup mb --- astro.config.mjs | 18 ++++++------------ public/external-links.js | 6 ++++++ 2 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 public/external-links.js diff --git a/astro.config.mjs b/astro.config.mjs index 2bc4246..e18f515 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,24 +4,18 @@ import starlight from '@astrojs/starlight'; import starlightThemeGalaxy from 'starlight-theme-galaxy'; import starlightSidebarTopics from 'starlight-sidebar-topics'; import starlightLinksValidator from 'starlight-links-validator'; -import remarkExternalLinks from 'remark-external-links'; export default defineConfig({ site: 'https://beta.nextftc.dev', - markdown: { - remarkPlugins: [ - [ - remarkExternalLinks, - { - target: '_blank', - rel: ['noopener', 'noreferrer'], - }, - ], - ], - }, integrations: [ starlight({ title: 'NextFTC', + head: [ + { + tag: 'script', + src: '/scripts/external-links.js', + }, + ], logo: { light: './src/assets/nextftc-banner-light.png', dark: './src/assets/nextftc-banner-dark.png', diff --git a/public/external-links.js b/public/external-links.js new file mode 100644 index 0000000..e0b7cb8 --- /dev/null +++ b/public/external-links.js @@ -0,0 +1,6 @@ +document.addEventListener('DOMContentLoaded', () => { + document.querySelectorAll('a[href^="http"]').forEach((link) => { + link.setAttribute('target', '_blank'); + link.setAttribute('rel', 'noopener noreferrer'); + }); +});`` \ No newline at end of file From d4b71471d4d62afa33ace964a3a12ea8b39c7fe9 Mon Sep 17 00:00:00 2001 From: Sid <114190535+siddharth-shah121@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:12:24 -0400 Subject: [PATCH 3/3] Links lowk open in a new tab eh --- astro.config.mjs | 5 ++++- public/{ => scripts}/external-links.js | 0 2 files changed, 4 insertions(+), 1 deletion(-) rename public/{ => scripts}/external-links.js (100%) diff --git a/astro.config.mjs b/astro.config.mjs index e18f515..5cdaef5 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -12,8 +12,11 @@ export default defineConfig({ title: 'NextFTC', head: [ { + //Look at /public/scripts/external-links thats where the thing happens tag: 'script', - src: '/scripts/external-links.js', + attrs: { + src: '/scripts/external-links.js', + }, }, ], logo: { diff --git a/public/external-links.js b/public/scripts/external-links.js similarity index 100% rename from public/external-links.js rename to public/scripts/external-links.js