diff --git a/src/components/Footer.astro b/src/components/Footer.astro index dd10cf3..e79cc66 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,4 +1,5 @@ --- +import { siteMetadata } from '~/constants'; import GithubIcon from '../icons/Github.astro'; const { currentPathname } = Astro.props; @@ -14,7 +15,7 @@ const isHomepage = currentPathname === '/'; diff --git a/src/components/LatestRelease.astro b/src/components/LatestRelease.astro index cbad58b..19ab923 100644 --- a/src/components/LatestRelease.astro +++ b/src/components/LatestRelease.astro @@ -1,13 +1,12 @@ --- import Bowser from 'bowser'; import { format, parseISO } from 'date-fns'; +import { siteMetadata } from '~/constants'; import DownloadIcon from '../icons/Download.astro'; import type { Assets, DownloadLink, DownloadLinks, HeroData } from '../types'; -const REPO_API_URL = - 'https://api.github.com/repos/gitify-app/gitify/releases/latest'; -const REPO_RELEASES_URL = - 'https://github.com/gitify-app/gitify/releases/latest'; +const REPO_API_URL = `https://api.github.com/repos/${siteMetadata.repo}/releases/latest`; +const REPO_RELEASES_URL = `https://github.com/${siteMetadata.repo}/releases/latest`; const releaseDetailsClassName = 'text-sm mt-4'; const getDownloadLinks = (assets: Assets[]): DownloadLinks => { diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index c334940..b3e8925 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -1,5 +1,5 @@ --- -import { siteMetadata } from '../constants'; +import { siteMetadata } from '~/constants'; import GithubIcon from '../icons/Github.astro'; import Logo from './Logo.astro'; @@ -41,7 +41,7 @@ const isHomepage = currentPathname === '/'; diff --git a/src/components/solid/FaqAccordion.tsx b/src/components/solid/FaqAccordion.tsx index 056aab7..c252a03 100644 --- a/src/components/solid/FaqAccordion.tsx +++ b/src/components/solid/FaqAccordion.tsx @@ -5,13 +5,14 @@ import { AccordionItem, AccordionTrigger, } from '~/components/ui/Accordion'; +import { siteMetadata } from '~/constants'; const content = [ { id: '1', question: "My notifications aren't showing?", answer: - "Some organisations require applications to request access before allowing access to any data (including notifications) about their repositories.\n\nTo check if Gitify is approved by your organisation you can go to [settings](https://github.com/settings/applications), then click on **Gitify** and scroll to **Organization access**.\n\nAlternatively, if you generated a **PAT**, you can check if it has the correct permissions by going to [settings](https://github.com/settings/tokens) and checking if the token's SSO has been Authorized.", + "Some organizations require applications to request access before allowing access to any data (including notifications) about their repositories.\n\nTo check if Gitify is approved by your organisation you can go to [settings](https://github.com/settings/applications), then click on **Gitify** and scroll to **Organization access**.\n\nAlternatively, if you generated a **PAT**, you can check if it has the correct permissions by going to [settings](https://github.com/settings/tokens) and checking if the token's SSO has been Authorized.", }, { id: '2', @@ -34,8 +35,7 @@ const content = [ { id: '5', question: 'How can I contribute to Gitify?', - answer: - "You can contribute to Gitify by opening a pull request @[gitify-app/gitify](https://github.com/gitify-app/gitify)! Check out our open issues and see if there's anything you'd like to work on.", + answer: `You can contribute to Gitify by opening a pull request @[${siteMetadata.repo}](https://github.com/${siteMetadata.repo})! Check out our open issues and see if there's anything you'd like to work on.`, }, ]; diff --git a/src/constants.ts b/src/constants.ts index 0671cae..6558729 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -3,6 +3,7 @@ export const SITE_URL = import.meta.env.SITE_URL || 'http://localhost:3000'; export const siteMetadata = { title: 'Gitify', description: 'Your GitHub notifications on your menu bar.', + repo: 'gitify-app/gitify', keywords: 'gitify,desktop,application,github,notifications,unread,menu bar,electron,open source,ekonstantinidis,manosim,mac,osx,linux', author: '@manosim_',