diff --git a/public/avatar.jpg b/public/avatar.jpg index a5ba26e..c9d3608 100644 Binary files a/public/avatar.jpg and b/public/avatar.jpg differ diff --git a/src/components/GiteaProjectCard.astro b/src/components/GiteaProjectCard.astro new file mode 100644 index 0000000..31b3703 --- /dev/null +++ b/src/components/GiteaProjectCard.astro @@ -0,0 +1,101 @@ +--- +import type { GiteaRepoWithMirrors } from "../lib/gitea"; +import { getBannerUrl } from "../lib/gitea"; +import { ExternalLink, ChevronDown } from "@lucide/astro"; + +interface Props { + repo: GiteaRepoWithMirrors; +} + +const { repo } = Astro.props; +const bannerUrl = getBannerUrl(repo); + +const platforms = [ + ...(repo.mirrors.github ? [{ label: "GitHub", url: repo.mirrors.github }] : []), + ...(repo.mirrors.gitlab ? [{ label: "GitLab", url: repo.mirrors.gitlab }] : []), + { label: "Gitea", url: repo.html_url }, +]; + +const hasMultiplePlatforms = platforms.length > 1; +--- + +
+
+ {repo.name} +
+ +
+

+ + {repo.name} + +

+ + {repo.description && ( +

{repo.description}

+ )} + +
+ {repo.topics.map((topic) => ( + + {topic} + + ))} +
+ +
+ {repo.website && ( + + + + Website + + )} + + {hasMultiplePlatforms ? ( + + ) : ( + + + + View on Gitea + + )} +
+
+
diff --git a/src/components/Hero.astro b/src/components/Hero.astro index da9b136..379d8ea 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -10,6 +10,8 @@ interface Props { location?: string; socialLinks?: { github?: string; + gitlab?: string; + gitea?: string; linkedin?: string; twitter?: string; bluesky?: string; @@ -68,6 +70,44 @@ const { name, title, description, avatar, location, socialLinks, gpgKey } = )} + {socialLinks.gitlab && ( +
+ + + + + +
+ )} + {socialLinks.gitea && ( +
+ + + + + +
+ )} {socialLinks.linkedin && (
)} {socialLinks.kofi && ( -
+
diff --git a/src/components/ProjectCard.astro b/src/components/ProjectCard.astro deleted file mode 100644 index 5239d71..0000000 --- a/src/components/ProjectCard.astro +++ /dev/null @@ -1,95 +0,0 @@ ---- -import { Image } from "astro:assets"; -import TagBadge from "./TagBadge.astro"; -import { ExternalLink, Eye } from "@lucide/astro"; -import type { CollectionEntry } from "astro:content"; - -interface Props { - project: CollectionEntry<"projects">; -} - -const { project } = Astro.props; ---- - -
-
- {project.data.title} -
-
-

- {project.data.title} -

-

{project.data.description}

- { - project.data.tags && project.data.tags.length > 0 && ( -
- {project.data.tags.map((tag) => ( - - ))} -
- ) - } -
- { - project.data.demoLink && ( - - - Demo - - ) - } - { - project.data.url && ( - - - Website - - ) - } - { - project.data.sourceLink && ( - - - - - Source - - ) - } -
- - - -
-
-
-
diff --git a/src/components/Projects.astro b/src/components/Projects.astro index 81249be..9339c88 100644 --- a/src/components/Projects.astro +++ b/src/components/Projects.astro @@ -1,9 +1,10 @@ --- -import { getCollection } from "astro:content"; -import ProjectCard from "./ProjectCard.astro"; +import GiteaProjectCard from "./GiteaProjectCard.astro"; import { ArrowRight } from "@lucide/astro"; +import { fetchGiteaRepos } from "../lib/gitea"; -const projectEntries = await getCollection("projects"); +const repos = await fetchGiteaRepos(); +const latestRepos = repos.slice(0, 3); // 3 plus récents sur la homepage ---
@@ -12,21 +13,16 @@ const projectEntries = await getCollection("projects");

Check out my latest work

I enjoy the challenge of reimagining existing programs & scripts in my - own unique way. By creating these projects from scratch, I can ensure - complete control over every aspect of their design and functionality. + own unique way.

- {projectEntries.map((project) => )} + {latestRepos.map((repo) => )}
- + View All Projects diff --git a/src/config.ts b/src/config.ts index e2933f5..cf4d716 100644 --- a/src/config.ts +++ b/src/config.ts @@ -3,6 +3,8 @@ */ export interface SocialLinks { github?: string; + gitlab?: string; + gitea?: string; linkedin?: string; twitter?: string; bluesky?: string; @@ -39,6 +41,8 @@ export const siteConfig: SiteConfig = { location: "🇫🇷 France", socialLinks: { github: "https://github.com/anotherhadi", + gitlab: "https://gitlab.com/anotherhadi", + gitea: "https://git.hadi.icu", twitter: "", bluesky: "", kofi: "https://ko-fi.com/anotherhadi", diff --git a/src/content.config.ts b/src/content.config.ts index bd141a7..10ee435 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -1,20 +1,6 @@ import { defineCollection, z } from "astro:content"; import { glob } from "astro/loaders"; -const projects = defineCollection({ - loader: glob({ pattern: "**/*.md", base: "./src/content/projects" }), - schema: ({ image }) => - z.object({ - title: z.string(), - description: z.string(), - image: image(), - tags: z.array(z.string()), - demoLink: z.string().url().optional(), - url: z.string().url().optional(), - sourceLink: z.string().url().optional(), - }), -}); - const blog = defineCollection({ loader: glob({ pattern: "**/*.{md,mdx}", base: "./src/content/blog" }), schema: ({ image }) => @@ -29,6 +15,5 @@ const blog = defineCollection({ }); export const collections = { - projects, blog, }; diff --git a/src/content/projects/default-creds.md b/src/content/projects/default-creds.md deleted file mode 100644 index f048a27..0000000 --- a/src/content/projects/default-creds.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -title: "Default-Creds" -description: "Default Creds is a centralized, community-driven repository of factory-set credentials. Designed for pentesters and security researchers, it helps identify weak access points during engagement phases or audit internal infrastructure before they become a security liability." -image: "../../../public/images/projects/default-creds.png" -tags: ["default-password", "cybersecurity"] -demoLink: "https://default-creds.hadi.icu" -sourceLink: "https://github.com/anotherhadi/default-creds" ---- - - - - - - - - - - - - - - -**Default Creds** is a centralized, community-driven repository of factory-set credentials. Designed for pentesters and security researchers, it helps identify weak access points during engagement phases or audit internal infrastructure before they become a security liability. - -**Live Instance:** [default-creds.hadi.icu](https://default-creds.hadi.icu) - -**API Documentation:** [default-creds.hadi.icu/api-docs](https://default-creds.hadi.icu/api-docs) - -## 🎯 The Mission - -In the world of cybersecurity, "low-hanging fruit" often comes in the form of unchanged default passwords. Our mission is to provide a fast, reliable, and searchable database of these credentials to help security professionals secure systems before attackers exploit them. - -## ⚙️ How it Works - -This application is built with **Astro** and **Svelte 5** for maximum performance. It operates as a "Flat-File Database": - -1. **YAML Powered:** All credentials are stored as structured `.yaml` files in the `src/data/` directory. -2. **Real-time Search:** The API parses these files on-the-fly (or via build cache) to provide instant results based on service names, versions, or tags. -3. **Developer Friendly:** A public API is available to integrate these credentials into your own automated scanning tools. - -## 🤝 Community Driven & Contributing - -Security is a collective effort. This project only grows as the community discovers and adds new default configurations. - -- **Want to add an app?** Just create a new YAML file in `src/data/`. -- **Found a mistake?** Submit a Pull Request to update existing entries. - -Before contributing, please read our [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines on how to format your YAML files. - -## 💻 Local Development - -### Prerequisites - -- Bun (or nix, just `nix develop`) - -### Installation - -1. **Clone the repo:** - -```bash -git clone https://github.com/anotherhadi/default-creds.git -cd default-creds - -``` - -2. **Start the dev server:** - -```bash -bun dev -``` - -3. **Add your data:** - Drop a `.yaml` file into `src/data/` and it will appear in the search results instantly! - -### 🛠️ Tech Stack - -- **Framework:** [Astro](https://astro.build/) -- **UI Logic:** [Svelte 5 (Runes)](https://svelte.dev/) -- **Styling:** [Tailwind CSS](https://tailwindcss.com/) + [DaisyUI](https://daisyui.com/) - -## ⚠️ Legal Disclaimer - -Usage of **Default Creds** for attacking targets without prior mutual consent is illegal. It is the end user's responsibility to obey all applicable local, state, and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program. diff --git a/src/content/projects/github-recon.md b/src/content/projects/github-recon.md deleted file mode 100644 index 9ef9e98..0000000 --- a/src/content/projects/github-recon.md +++ /dev/null @@ -1,223 +0,0 @@ ---- -title: "Github Recon" -description: "Retrieves and aggregates public OSINT data about a GitHub user using Go and the GitHub API. Finds hidden emails in commit history, previous usernames, friends, other GitHub accounts, and more." -image: "../../../public/images/projects/github-recon.png" -tags: ["osint", "github", "cybersecurity"] -sourceLink: "https://github.com/anotherhadi/github-recon" ---- - -

- Latest Release - GoDoc - GoReportCard -

- -- [🧾 Project Overview](#-project-overview) -- [🚀 Features](#-features) -- [⚠️ Disclaimer](#%EF%B8%8F-disclaimer) -- [📦 Installation](#-installation) - - [With Go](#with-go) - - [With Nix/NixOS](#with-nixnixos) -- [🧪 Usage](#-usage) - - [Flags](#flags) - - [Token](#token) - - [How does the email spoofing work?](#how-does-the-email-spoofing-work) -- [💡 Examples](#-examples) -- [🕵️‍♂️ Cover your tracks](#%EF%B8%8F%EF%B8%8F-cover-your-tracks) -- [🤝 Contributing](#-contributing) -- [🙏 Credits](#-credits) - -## 🧾 Project Overview - -Retrieves and aggregates public OSINT data about a GitHub user using Go and the -GitHub API. Finds hidden emails in commit history, previous usernames, friends, -other GitHub accounts, and more. - -
-Screenshot -example screenshot -
- -## 🚀 Features - -- Export results to JSON - -**From usernames:** - -- Retrieve basic user profile information (username, ID, avatar, bio, creation - date) -- Display avatars directly in the terminal -- List organizations and roles -- Fetch SSH and GPG keys -- Enumerate social accounts -- Extract unique commit authors (name + email) -- Find close friends -- Deep scan option (clone repositories, run regex searches, analyze licenses, - etc.) -- Use Levenshtein distance for matching usernames and emails -- TruffleHog integration to find secrets - -**From emails:** - -- Search for a specific email across all GitHub commits -- Spoof an email to discover the associated user account - -## ⚠️ Disclaimer - -This tool is intended for educational purposes only. Use responsibly and ensure -you have permission to access the data you are querying. - -## 📦 Installation - -### With Go - -```bash -go install github.com/anotherhadi/github-recon@latest -``` - -### With Nix/NixOS - -
-Click to expand - -**From anywhere (using the repo URL):** - -```bash -nix run github:anotherhadi/github-recon -- [--flags value] target_username_or_email -``` - -**Permanent Installation:** - -```bash -# add the flake to your flake.nix -{ - inputs = { - github-recon.url = "github:anotherhadi/github-recon"; - }; -} - -# then add it to your packages -environment.systemPackages = with pkgs; [ # or home.packages - inputs.github-recon.defaultPackage.${pkgs.system} -]; -``` - -
- -## 🧪 Usage - -```bash -github-recon [--flags value] target_username_or_email -``` - -### Flags - -```txt --t, --token string Github personal access token (e.g. ghp_aaa...). Can also be set via GITHUB_RECON_TOKEN environment variable. You also need to set the token in $HOME/.config/github-recon/env file if you want to use this tool without passing the token every time. (default "null") --d, --deepscan Enable deep scan (clone repos, regex search, analyse licenses, etc.) - --max-size int Limit the size of repositories to scan (in MB) (only for deep scan) (default 150) --e, --exclude-repo strings Exclude repos from deep scan (comma-separated list, only for deep scan) --r, --refresh Refresh the cache (only for deep scan) --s, --show-source Show where the information (authors, emails, etc) were found (only for deep scan) --m, --max-distance int Maximum Levenshtein distance for matching usernames & emails (only for deep scan) (default 20) - --trufflehog Run trufflehog on cloned repositories (only for deep scan) (default true) --S, --silent Suppress all non-essential output - --spoof-email Spoof email (only for email mode) (default true) --a, --print-avatar Show the avatar in the output --j, --json string Write results to specified JSON file -``` - -### Token - -For the best experience, provide a **GitHub Personal Access Token**. Without a -token, you will quickly hit the **rate limit** and have to wait. - -- For **basic usage**, you can create a token **without any permissions**. -- For the **email spoofing feature**, you need to add the **`repo`** and - **`delete_repo`** permissions. - -You can set the token in multiple ways: - -- **Command-line flag**: - - ```bash - github-recon -t "ghp_xxx..." - ``` - -- **Environment variable**: - - ```bash - export GITHUB_RECON_TOKEN=ghp_xxx... - ``` - -- **Config file**: Create the file `~/.config/github-recon/env` and add: - - ```env - GITHUB_RECON_TOKEN=ghp_xxx... - ``` - -> For safety, it is recommended to create the Personal Access Token on a -> **separate GitHub account** rather than your main account. This way, if -> anything goes wrong, your primary account remains safe. - -### How does the email spoofing work? - -Here’s the process: - -1. Create a new repository. -2. Make a commit using the **target's email** as the author. -3. Push the commit to GitHub. -4. Observe which GitHub account the commit is linked to. This method **always - works**, but it only reveals the account if the email is set as the user’s - **primary email**. - -All of these steps are handled **automatically by the tool**, so you just need -to provide the target email. - -## 💡 Examples - -```bash -github-recon anotherhadi --token ghp_ABC123... -github-recon myemail@gmail.com # Find github accounts by email -github-recon anotherhadi --json output.json --deepscan # Clone the repo and search for leaked email -``` - -## 🕵️‍♂️ Cover your tracks - -Understanding what information about you is publicly visible is the first step -to managing your online presence. github-recon can help you identify your own -publicly available data on GitHub. Here’s how you can take steps to protect your -privacy and security: - -- **Review your public profile**: Regularly check your GitHub profile and - repositories to ensure that you are not unintentionally exposing sensitive - information. -- **Manage email exposure**: Use GitHub's settings to control which email - addresses are visible on your profile and in commit history. You can also use - a no-reply email address for commits, and an - [alias email](https://proton.me/support/addresses-and-aliases) for your - account. Delete/modify any sensitive information in your commit history. -- **Be Mindful of Repository Content**: Avoid including sensitive information in - your repositories, such as API keys, passwords, emails or personal data. Use - `.gitignore` to exclude files that contain sensitive information. - -You can also use a tool like [TruffleHog](github.com/trufflesecurity/trufflehog) -to scan your repositories specifically for exposed secrets and tokens. - -**Useful links:** - -- [Blocking command line pushes that expose your personal email address](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/blocking-command-line-pushes-that-expose-your-personal-email-address) -- [No-reply email address](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address) - -## 🤝 Contributing - -Feel free to contribute! See [CONTRIBUTING.md](https://github.com/anotherhadi/github-recon/blob/main/CONTRIBUTING.md) for details. - -## 🙏 Credits - -Some features and ideas in this project were inspired by the following tools: - -- [gitrecon](https://github.com/GONZOsint/gitrecon) by GONZOsint -- [gitfive](https://github.com/mxrch/gitfive) by mxrch - -Big thanks to their authors for sharing their work with the community. diff --git a/src/content/projects/n4c.md b/src/content/projects/n4c.md deleted file mode 100644 index 0f9d5eb..0000000 --- a/src/content/projects/n4c.md +++ /dev/null @@ -1,63 +0,0 @@ ---- -title: "Nix 4 cyber" -description: "A modular, open‑source toolkit & knowledge-base for cyber‑security professionals built with nix & markdown, for CTF, OSINT or Pentest." -image: "../../../public/images/projects/n4c.png" -tags: ["nix", "ctf", "cybersecurity", "cheatsheets"] -url: "https://n4c.hadi.icu" -sourceLink: "https://github.com/nix4cyber/n4c" ---- - -A modular, open‑source toolkit for cyber‑security professionals built with nix & markdown - -![Hugo](https://img.shields.io/badge/Hugo-FF4088?style=for-the-badge&logo=hugo&logoColor=white) -![MIT License](https://img.shields.io/badge/MIT-green?style=for-the-badge) -[![Netlify Status](https://api.netlify.com/api/v1/badges/36717393-ff25-4e1f-b33a-8f5f2ed4c0e6/deploy-status)](https://app.netlify.com/projects/nix4cyber/deploys) - -## Overview - -N4C (**nix4cyber**) is a personal knowledge-base and toolbox for CTF (capture the flag) & OSINT - -It combines three core components: - -- [Nix-based shells](https://n4c.hadi.icu/shells): pre-configured environments for specific security domains (web, cracking, networking, forensic, ...). -- [Cheat‑sheets](https://n4c.hadi.icu/cheatsheets/cheatsheets): quick reference guides organized by category. -- [CTF write‑ups](https://n4c.hadi.icu/writeups): markdown-formatted reports of challenges we've solved. - -All content is served through a static website built with [Hugo](https://gohugo.io/) and the [Doks](https://github.com/DELIGHT-LABS/hugo-theme-doks) (<3) theme, hosted on Netlify. The project is fully open‑source under the MIT license and lives on GitHub. - -## Usage - -To use nix4cyber, you need to have [Nix](https://nixos.org/) installed on your system. -You can then start a shell with the following command: - -```sh -nix develop github:nix4cyber/n4c# -``` - -You could also install the alias `n4c` ([see here](https://n4c.hadi.icu/shells#alias)) and only type `n4c ` - -More informations about shells & toolkits [here](https://n4c.hadi.icu/shells) - -### Example - -```sh -# Example: Launch the web pentesting toolkit -nix develop github:nix4cyber/n4c#web - -# Inside the shell -nmap -A target.com -``` - -## Disclaimer - -Nix4cyber is intended solely for lawful, ethical, and educational purposes. -It is designed to assist cybersecurity professionals, researchers, and students in conducting authorized security assessments, penetration testing, and digital forensics within environments where they have explicit permission to operate. - -By using this project, you agree to comply with all applicable laws and regulations. The maintainers of Nix 4 Cyber are not responsible for any misuse of the tools or scripts provided. Unauthorized or malicious use of this project is strictly prohibited and may violate local, national, or international laws. - -Use responsibly. Always obtain proper authorization before conducting any security testing. - -## Contributing - -Contributions are welcome! -Feel free to open issues, propose new toolkits, or share CTF write-ups via pull requests. diff --git a/src/content/projects/nixy.md b/src/content/projects/nixy.md deleted file mode 100644 index c37d294..0000000 --- a/src/content/projects/nixy.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -title: "Nixy" -description: "Nixy simplifies and unifies the Hyprland ecosystem with a modular, easily customizable setup. It provides a structured way to manage your system configuration and dotfiles with minimal effort." -image: "../../../public/images/projects/nixy.png" -tags: ["dotfiles", "nixos", "hyprland", "rice"] -demoLink: "https://github.com/anotherhadi/nixy#screenshots" -sourceLink: "https://github.com/anotherhadi/nixy" ---- - - - - - - - - - - - - - - -**Nixy simplifies and unifies** the Hyprland ecosystem with a modular, easily -customizable setup. It provides a structured way to manage your system -configuration and dotfiles with minimal effort. It includes _home-manager_, -_secrets_, and _custom theming_ all in one place. - -**Features:** - -- 💻 Hyprland & Caelestia: Preconfigured Hyprland ecosystem with Caelestia-shell (Ty to both projects!) -- 🎨 Consistent Theming: Base16 & Stylix-powered themes -- ⌨️ Vim-like Everywhere: Unified keybindings (Hyprland, nvim, vimium, etc.) - -## Table of Content - -- [Table of Content](#table-of-content) -- [Installation](#installation) -- [Documentation](#documentation) - -## Installation - -1. [Fork](https://github.com/anotherhadi/nixy/fork) this repo and clone it to - your system: - -```sh -git clone https://github.com/anotherhadi/nixy ~/.config/nixos -``` - -2. Copy the `hosts/laptop` folder, rename it to match your system’s hostname, - and update `variables.nix` with your machine’s settings. -3. Copy your `hardware-configuration.nix` into your new host's folder to ensure - proper hardware support. -4. Register your new host in `flake.nix` by adding it under nixosConfigurations. - -> `# CHANGEME` comments are placed throughout the config to -> indicate necessary modifications. Use the following command to quickly locate -> them: -> -> ```sh -> rg "CHANGEME" ~/.config/nixos -> ``` - -> When you add new files, don't forget to run `git add .` to add them to the git -> repository - -5. Build the system - -```sh -sudo nixos-rebuild switch --flake ~/.config/nixos#yourhostname -``` - -## Documentation - -- [SERVER](https://github.com/anotherhadi/nixy/blob/main/docs/SERVER.md): Check out the server documentation -- [THEMES](https://github.com/anotherhadi/nixy/blob/main/docs/THEMES.md): How themes work and how to create your own -- [WALLPAPERS](https://github.com/anotherhadi/awesome-wallpapers): An awesome - collection of wallpapers - -- [CONTRIBUTING](https://github.com/anotherhadi/nixy/blob/main/docs/CONTRIBUTING.md): How to contribute -- [LICENSE](https://github.com/anotherhadi/nixy/blob/main/LICENSE): MIT License diff --git a/src/layouts/ProjectLayout.astro b/src/layouts/ProjectLayout.astro index 544eb7d..5c699e1 100644 --- a/src/layouts/ProjectLayout.astro +++ b/src/layouts/ProjectLayout.astro @@ -21,7 +21,7 @@ const { title, description, image, tags, demoLink, url, sourceLink } =
-
+
Back to Projects @@ -124,7 +124,7 @@ const { title, description, image, tags, demoLink, url, sourceLink } =
- View All Projects diff --git a/src/lib/gitea.ts b/src/lib/gitea.ts new file mode 100644 index 0000000..7d81bd3 --- /dev/null +++ b/src/lib/gitea.ts @@ -0,0 +1,79 @@ +export interface GiteaRepo { + id: number; + name: string; + full_name: string; + description: string; + html_url: string; + updated_at: string; + topics: string[]; + stars_count: number; + language: string | null; + fork: boolean; + private: boolean; + website: string; +} + +export interface RepoMirrors { + github?: string; + gitlab?: string; +} + +export interface GiteaRepoWithMirrors extends GiteaRepo { + mirrors: RepoMirrors; +} + +const GITEA_BASE = "https://git.hadi.icu"; +const GITEA_USER = "anotherhadi"; +const GITHUB_USER = "anotherhadi"; +const GITLAB_USER = "anotherhadi"; + +async function checkMirrors(repoName: string): Promise { + const mirrors: RepoMirrors = {}; + + const [githubRes, gitlabRes] = await Promise.allSettled([ + fetch(`https://github.com/${GITHUB_USER}/${repoName}`, { method: "HEAD" }), + fetch(`https://gitlab.com/${GITLAB_USER}/${repoName}`, { method: "HEAD" }), + ]); + + if (githubRes.status === "fulfilled" && githubRes.value.ok) { + mirrors.github = `https://github.com/${GITHUB_USER}/${repoName}`; + } + if (gitlabRes.status === "fulfilled" && gitlabRes.value.ok) { + mirrors.gitlab = `https://gitlab.com/${GITLAB_USER}/${repoName}`; + } + + return mirrors; +} + +export async function fetchGiteaRepos(): Promise { + try { + const res = await fetch( + `${GITEA_BASE}/api/v1/users/${GITEA_USER}/repos?limit=50&page=1` + ); + if (!res.ok) throw new Error(`Gitea API: ${res.status}`); + + const repos: GiteaRepo[] = await res.json(); + const filtered = repos + .filter((r) => !r.fork && !r.private) + .sort( + (a, b) => + new Date(b.updated_at).getTime() - new Date(a.updated_at).getTime() + ); + + const reposWithMirrors = await Promise.all( + filtered.map(async (repo) => ({ + ...repo, + mirrors: await checkMirrors(repo.name), + })) + ); + + return reposWithMirrors; + } catch (e) { + console.error("Failed to fetch Gitea repos:", e); + return []; + } +} + +export function getBannerUrl(repo: GiteaRepo): string { + return `${GITEA_BASE}/${repo.full_name}/raw/branch/main/.github/assets/banner.png`; +} diff --git a/src/pages/403.astro b/src/pages/403.astro index fd57bb3..04e4f02 100644 --- a/src/pages/403.astro +++ b/src/pages/403.astro @@ -30,7 +30,7 @@ import { House, FolderOpen } from "@lucide/astro"; Go Home - + View Projects @@ -44,7 +44,7 @@ import { House, FolderOpen } from "@lucide/astro";
diff --git a/src/pages/404.astro b/src/pages/404.astro index e08cf80..9422b64 100644 --- a/src/pages/404.astro +++ b/src/pages/404.astro @@ -30,7 +30,7 @@ import { House, FolderOpen } from "@lucide/astro"; Go Home - + View Projects @@ -44,7 +44,7 @@ import { House, FolderOpen } from "@lucide/astro";
diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[...slug].astro deleted file mode 100644 index 0651e8a..0000000 --- a/src/pages/projects/[...slug].astro +++ /dev/null @@ -1,28 +0,0 @@ ---- -import { getCollection, render } from "astro:content"; -import ProjectLayout from "../../layouts/ProjectLayout.astro"; - -export async function getStaticPaths() { - const projectEntries = await getCollection("projects"); - - return projectEntries.map((entry) => ({ - params: { slug: entry.id }, - props: { entry }, - })); -} - -const { entry } = Astro.props; -const { Content } = await render(entry); ---- - - - - diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro index a602693..42d07ce 100644 --- a/src/pages/projects/index.astro +++ b/src/pages/projects/index.astro @@ -1,11 +1,10 @@ --- import Layout from "../../layouts/Layout.astro"; -import { getCollection } from "astro:content"; -import ProjectCard from "../../components/ProjectCard.astro"; +import GiteaProjectCard from "../../components/GiteaProjectCard.astro"; import { ChevronLeft } from "@lucide/astro"; -import { ArrowRight } from "lucide-astro"; +import { fetchGiteaRepos } from "../../lib/gitea"; -const projects = await getCollection("projects"); +const repos = await fetchGiteaRepos(); ---
-

Projects

I enjoy the challenge of reimagining existing programs & scripts in my - own unique way. By creating these projects from scratch, I can ensure - complete control over every aspect of their design and functionality. + own unique way.

- - { - projects.length === 0 ? ( + repos.length === 0 ? (

- No projects yet. Check back soon! + No projects found. Check back soon!

) : (
- {projects.map((project) => ( - + {repos.map((repo) => ( + ))}
) } - -