From e80b9bd9183382818869e9daef0e8dbac6f557ba Mon Sep 17 00:00:00 2001 From: Zach Harel Date: Thu, 1 Oct 2026 12:18:49 -0400 Subject: [PATCH] add edit link to the bottom of pages Signed-off-by: Zach Harel --- astro.config.mjs | 4 ++++ src/env.d.ts | 5 +++++ src/starlightOverrides/Footer.astro | 15 +++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/astro.config.mjs b/astro.config.mjs index 78d7ffb0..6938eb75 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -101,6 +101,10 @@ export default defineConfig({ // untranslated pages are fallbacks and we don't want to error if a translation isn't complete yet starlightLinksValidator({ errorOnFallbackPages: false }), ], + editLink: { + baseUrl: + 'https://github.com/frcsoftware/frcsoftware.org/edit/main/', + }, }), ], }); diff --git a/src/env.d.ts b/src/env.d.ts index f0efec1e..7b7e324a 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -9,3 +9,8 @@ declare module 'virtual:starlight/components/MobileMenuFooter' { const MobileMenuFooter: typeof import('@astrojs/starlight/components/MobileMenuFooter.astro').default; export default MobileMenuFooter; } + +declare module 'virtual:starlight/components/EditLink' { + const EditLink: typeof import('@astrojs/starlight/components/EditLink.astro').default; + export default EditLink; +} diff --git a/src/starlightOverrides/Footer.astro b/src/starlightOverrides/Footer.astro index b7169ed6..bc7fef38 100644 --- a/src/starlightOverrides/Footer.astro +++ b/src/starlightOverrides/Footer.astro @@ -1,6 +1,7 @@ --- import { mdiGithub } from '@mdi/js'; import MdiIcon from '../components/MdiIcon.astro'; +import EditLink from 'virtual:starlight/components/EditLink'; import Pagination from 'virtual:starlight/components/Pagination'; const t = Astro.locals.t; @@ -13,6 +14,9 @@ const mdiDiscord =