diff --git a/.gitignore b/.gitignore index d788d29..6d751af 100644 --- a/.gitignore +++ b/.gitignore @@ -22,4 +22,4 @@ pnpm-debug.log* package-lock.json pnpm-lock.yaml -.astro \ No newline at end of file +.astro diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..e5cb0bc --- /dev/null +++ b/src/constants.ts @@ -0,0 +1,2 @@ +export const DISCORD_INVITE = "https://discord.gg/NsY4AhAtk8" +export const REDBUBBLE_LINK = "https://www.redbubble.com/people/Gurkult/explore" diff --git a/src/navigation.js b/src/navigation.js index 7bd1440..d9ae3f8 100644 --- a/src/navigation.js +++ b/src/navigation.js @@ -1,9 +1,10 @@ import { getPermalink, getBlogPermalink, getHomePermalink, getAsset } from './utils/permalinks'; +import { DISCORD_INVITE, REDBUBBLE_LINK } from '~/constants'; export const headerData = { - links: [ + links: [ { - text: "Home", + text: 'Home', href: getHomePermalink(), }, { @@ -20,14 +21,12 @@ export const headerData = { }, ], actions: [ - { text: "Shop Merch", href: import.meta.env.PUBLIC_REDBUBBLE_LINK, target: '_blank' }, - { text: 'Join Now', href: import.meta.env.PUBLIC_DISCORD_INVITE, target: '_blank', primary: true }, + { text: 'Shop Merch', href: REDBUBBLE_LINK, target: '_blank' }, + { text: 'Join Now', href: DISCORD_INVITE, target: '_blank', primary: true }, ], }; export const footerData = { - socialLinks: [ - { ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/gurkult' }, - ], - footNote: "", + socialLinks: [{ ariaLabel: 'Github', icon: 'tabler:brand-github', href: 'https://github.com/gurkult' }], + footNote: '', }; diff --git a/src/pages/about.astro b/src/pages/about.astro index 6d9af4c..c6ccf4b 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -5,6 +5,8 @@ import Stats from '~/components/widgets/Stats.astro'; import Steps2 from '~/components/widgets/Steps2.astro'; import Layout from '~/layouts/PageLayout.astro'; +import { DISCORD_INVITE } from '~/constants'; + const metadata = { title: 'About us', }; @@ -116,7 +118,7 @@ const metadata = { subtitle="Seems interesting? We're always looking for new members, and we'd love to have you! Click the link below to get started!" callToAction={{ text: 'Become a Gurkan', - href: import.meta.env.PUBLIC_DISCORD_INVITE, + href: DISCORD_INVITE, }} /> diff --git a/src/pages/index.astro b/src/pages/index.astro index 33f6ee7..f82acd3 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -13,6 +13,8 @@ const metadata = { title: 'Gurkult - the Gurkan Open Source Community', ignoreTitleTemplate: true, }; + +import { DISCORD_INVITE } from '~/constants'; --- @@ -23,7 +25,7 @@ const metadata = { { variant: 'primary', text: 'Join us', - href: import.meta.env.PUBLIC_DISCORD_INVITE, + href: DISCORD_INVITE, target: '_blank', icon: 'tabler:arrow-right', }, @@ -196,7 +198,7 @@ const metadata = { { variant: 'primary', text: 'Join now', - href: import.meta.env.PUBLIC_DISCORD_INVITE, + href: DISCORD_INVITE, }, ]} /> diff --git a/src/pages/pricing.astro b/src/pages/pricing.astro index ebe4cb3..167e4f2 100644 --- a/src/pages/pricing.astro +++ b/src/pages/pricing.astro @@ -10,6 +10,8 @@ import CallToAction from '~/components/widgets/CallToAction.astro'; const metadata = { title: 'Pricing', }; + +import { DISCORD_INVITE } from '~/constants'; --- @@ -65,7 +67,7 @@ const metadata = { callToAction: { target: '_blank', text: 'Join now', - href: import.meta.env.PUBLIC_DISCORD_INVITE, + href: DISCORD_INVITE, }, hasRibbon: true, ribbonTitle: 'popular', @@ -92,7 +94,7 @@ const metadata = { callToAction: { target: '_blank', text: 'Apply now', - href: import.meta.env.PUBLIC_DISCORD_INVITE, + href: DISCORD_INVITE, }, }, ]} @@ -215,7 +217,7 @@ const metadata = { { variant: 'primary', text: 'Join now', - href: import.meta.env.PUBLIC_DISCORD_INVITE, + href: DISCORD_INVITE, }, ]} /> diff --git a/src/pages/rss.xml.ts b/src/pages/rss.xml.ts index 4c5e2c3..7504bbf 100644 --- a/src/pages/rss.xml.ts +++ b/src/pages/rss.xml.ts @@ -1,7 +1,7 @@ import { getRssString } from '@astrojs/rss'; -import { SITE, METADATA, APP_BLOG } from '~/utils/config'; import { fetchPosts } from '~/utils/blog'; +import { APP_BLOG, METADATA, SITE } from '~/utils/config'; import { getPermalink } from '~/utils/permalinks'; export const GET = async () => {