Skip to content

Commit

Permalink
docs: use constant for repo
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <[email protected]>
  • Loading branch information
setchy committed Sep 15, 2024
1 parent 110efec commit 84e78b3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
3 changes: 2 additions & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
import { siteMetadata } from '~/constants';
import GithubIcon from '../icons/Github.astro';
const { currentPathname } = Astro.props;
Expand All @@ -14,7 +15,7 @@ const isHomepage = currentPathname === '/';
<a
target="_blank"
rel="noopener noreferrer"
href="https://github.com/gitify-app/gitify/"
href=`https://github.com/${siteMetadata.repo}`
aria-label="GitHub Repository"
class="mt-1 mb-4 mx-2 p-1 text-white hover:text-gray-400"
>
Expand Down
7 changes: 3 additions & 4 deletions src/components/LatestRelease.astro
Original file line number Diff line number Diff line change
@@ -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 => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
import { siteMetadata } from '../constants';
import { siteMetadata } from '~/constants';
import GithubIcon from '../icons/Github.astro';
import Logo from './Logo.astro';
Expand Down Expand Up @@ -41,7 +41,7 @@ const isHomepage = currentPathname === '/';
<a
class="flex flex-1 py-2 px-2 text-white hover:text-gray-300"
rel="noopener noreferrer"
href="https://github.com/gitify-app/gitify/"
href=`https://github.com/${siteMetadata.repo}`
aria-label="GitHub Repository"
>
<GithubIcon className="w-4 h-4" />
Expand Down
6 changes: 3 additions & 3 deletions src/components/solid/FaqAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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.`,
},
];

Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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_',
Expand Down

0 comments on commit 84e78b3

Please sign in to comment.