diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f1961d..d455143 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,17 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 - name: Install dependencies run: bun install - - name: Build + - name: Build projects run: bun run build diff --git a/bun.lockb b/bun.lockb index c3d7772..7ac877e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index e886e35..13ba32b 100644 --- a/package.json +++ b/package.json @@ -11,27 +11,27 @@ }, "dependencies": { "@hookform/resolvers": "^3.3.4", - "@radix-ui/react-avatar": "^1.0.4", - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-dropdown-menu": "^2.0.6", - "@radix-ui/react-hover-card": "^1.0.7", - "@radix-ui/react-label": "^2.0.2", - "@radix-ui/react-popover": "^1.0.7", - "@radix-ui/react-slot": "^1.0.2", - "@radix-ui/react-switch": "^1.0.3", - "@radix-ui/react-tabs": "^1.0.4", - "@radix-ui/react-tooltip": "^1.0.7", + "@radix-ui/react-avatar": "^1.1.0", + "@radix-ui/react-dialog": "^1.1.1", + "@radix-ui/react-dropdown-menu": "^2.1.1", + "@radix-ui/react-hover-card": "^1.1.1", + "@radix-ui/react-label": "^2.1.0", + "@radix-ui/react-popover": "^1.1.1", + "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-switch": "^1.1.0", + "@radix-ui/react-tabs": "^1.1.0", + "@radix-ui/react-tooltip": "^1.1.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", "cmdk": "^1.0.0", - "geist": "^1.3.0", - "lucide-react": "^0.378.0", - "next": "14.2.3", + "geist": "^1.3.1", + "lucide-react": "^0.441.0", + "next": "^14.2.11", "next-themes": "^0.3.0", "nextjs-toploader": "^1.6.12", - "posthog-js": "^1.131.4", - "react": "^18", - "react-dom": "^18", + "posthog-js": "^1.161.3", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-hook-form": "^7.51.4", "sonner": "^1.4.41", "tailwind-merge": "^2.3.0", @@ -41,12 +41,12 @@ }, "devDependencies": { "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", + "@types/react": "^18.3.5", + "@types/react-dom": "^18.3.0", "eslint": "^8", "eslint-config-next": "14.2.0", "postcss": "^8", - "tailwindcss": "^3.4.1", - "typescript": "^5" + "tailwindcss": "^3.4.11", + "typescript": "^5.6.2" } } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 2a9a287..eafa28b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,19 +1,32 @@ import type { Metadata } from "next"; import { GeistSans } from "geist/font/sans"; import { GeistMono } from "geist/font/mono"; -import { ThemeProvider } from "@/components/theme-provider"; -import { Toaster } from "@/components/ui/sonner"; import NextTopLoader from "nextjs-toploader"; + import Navbar from "@/components/navbar"; -import "./globals.css"; import { CSPostHogProvider } from "./provider"; +import { Toaster } from "@/components/ui/sonner"; +import { ThemeProvider } from "@/components/theme-provider"; + +import "./globals.css"; export const metadata: Metadata = { - metadataBase: new URL("https://www.github-stats.omsimos.com"), + metadataBase: new URL("https://github-stats.omsimos.com/"), title: "GitHub Stats Generator | Omsimos", description: "Make your special repository feel special! Generate GitHub README stats with ease! Generate your stats, streaks, & top languages with 40+ themes to choose from! ", - robots: "index, follow", + robots: { + index: true, + follow: true, + googleBot: { + index: true, + follow: true, + noimageindex: false, + "max-video-preview": -1, + "max-image-preview": "large", + "max-snippet": -1, + }, + }, openGraph: { type: "website", title: "GitHub Stats Generator — Omsimos", @@ -25,6 +38,12 @@ export const metadata: Metadata = { }, twitter: { card: "summary_large_image", + title: "GitHub Stats Generator — Omsimos", + description: + "Make your special repository feel special! Generate GitHub README stats with ease! Generate your stats, streaks, & top languages with 40+ themes to choose from!", + }, + alternates: { + canonical: "https://github-stats.omsimos.com/", }, }; @@ -38,9 +57,9 @@ export default function RootLayout({ - + {children} diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index 803bcde..49edc03 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -1,7 +1,25 @@ import Link from "next/link"; -import { ToggleTheme } from "./toggle-theme"; -import { GithubIcon } from "lucide-react"; +import { SVGProps } from "react"; + import { Button } from "./ui/button"; +import { ToggleTheme } from "./toggle-theme"; + +export function GithubIcon(props: SVGProps) { + return ( + + + + ); +} export default function Navbar() { return ( @@ -10,11 +28,11 @@ export default function Navbar() {
diff --git a/src/hooks/use-github-stats.ts b/src/hooks/use-github-stats.ts index 121f1a2..c72b092 100644 --- a/src/hooks/use-github-stats.ts +++ b/src/hooks/use-github-stats.ts @@ -1,3 +1,5 @@ +import { useMemo } from "react"; + export type Stats = { theme?: string; username?: string; @@ -8,11 +10,11 @@ export type Stats = { export const useGithubStats = (data: Stats) => { const { theme, username, countPrivate, hideBorder } = data; - const stats = `https://github-readme-stats.vercel.app/api?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&count_private=${countPrivate}`; - - const topLanguages = `https://github-readme-stats.vercel.app/api/top-langs/?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&layout=compact`; - - const streak = `https://github-readme-streak-stats.herokuapp.com/?user=${username}&theme=${theme}&hide_border=${hideBorder}`; + return useMemo(() => { + const stats = `https://github-readme-stats.vercel.app/api?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&count_private=${countPrivate}`; + const topLanguages = `https://github-readme-stats.vercel.app/api/top-langs/?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&layout=compact`; + const streak = `https://github-readme-streak-stats.herokuapp.com/?user=${username}&theme=${theme}&hide_border=${hideBorder}`; - return { stats, topLanguages, streak }; + return { stats, topLanguages, streak }; + }, [username, theme, hideBorder, countPrivate]); };