{"id":22245292,"url":"https://github.com/chenasraf/github-repos-astro-loader","last_synced_at":"2026-01-27T20:35:44.407Z","repository":{"id":265338582,"uuid":"895229853","full_name":"chenasraf/github-repos-astro-loader","owner":"chenasraf","description":"An Astro loader to fetch GitHub repositories for use as content in Astro websites","archived":false,"fork":false,"pushed_at":"2024-12-02T19:46:10.000Z","size":150,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-27T04:39:50.642Z","etag":null,"topics":["astro","astro-loader"],"latest_commit_sha":null,"homepage":"http://npmjs.com/package/github-repos-astro-loader","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chenasraf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"chenasraf","patreon":null,"open_collective":null,"ko_fi":"casraf","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=TSH3C3ABGQM22\u0026currency_code=ILS\u0026source=url"]}},"created_at":"2024-11-27T19:59:31.000Z","updated_at":"2025-01-04T18:19:26.000Z","dependencies_parsed_at":"2024-11-29T01:23:32.563Z","dependency_job_id":"66cabca3-2062-4e96-abfb-0aa50306561d","html_url":"https://github.com/chenasraf/github-repos-astro-loader","commit_stats":null,"previous_names":["chenasraf/github-repos-astro-loader"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenasraf%2Fgithub-repos-astro-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenasraf%2Fgithub-repos-astro-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenasraf%2Fgithub-repos-astro-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chenasraf%2Fgithub-repos-astro-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chenasraf","download_url":"https://codeload.github.com/chenasraf/github-repos-astro-loader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236330544,"owners_count":19131752,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["astro","astro-loader"],"created_at":"2024-12-03T05:12:40.891Z","updated_at":"2025-10-13T10:30:49.778Z","avatar_url":"https://github.com/chenasraf.png","language":"TypeScript","funding_links":["https://github.com/sponsors/chenasraf","https://ko-fi.com/casraf","https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=TSH3C3ABGQM22\u0026currency_code=ILS\u0026source=url","https://ko-fi.com/casraf'"],"categories":[],"sub_categories":[],"readme":"# GitHub Repositories Astro Loader\n\nThis is a content loader for Astro that fetches GitHub repositories and their README files, so you\ncan list them easily in your Astro site.\n\n[See a demo on my website](https://casraf.dev/projects)\n\n## Usage\n\nIn your `src/content/config.ts` file, add a new collection and use the loader:\n\n```ts\nimport githubReposLoader from 'github-repos-astro-loader'\nconst project = defineCollection({\n  loader: githubReposLoader({\n    // Required\n    apiToken: GITHUB_TOKEN, // GitHub API token to use for requests\n    username: 'myusername', // The GitHub username you want to fetch the repositories for\n\n    // Optional\n    orgs: ['myorg'], // A list of GitHub orgs to fetch repositories from\n    debug: true, // Output debug logs during processing\n    force: false, // Ignore cache and force a full re-fetch\n    overridesDir: 'src/content/project-overrides', // Directory to look for overrides\n    filter: (repo) =\u003e // Filter repositories to include in the collection\n      [\n        !repo.fork,\n        repo.stargazers_count! \u003e 0,\n        //\n      ].every(Boolean),\n    }),\n  }),\n})\n```\n\nThen you can use your new collection as you normally would in Astro:\n\n```astro\n---\nimport { getCollection } from 'astro:content'\nconst projects = await getCollection('project')\n---\n\n\u003cdiv\u003e\n  \u003ch3\u003eMy GitHub Projects\u003c/h3\u003e\n  \u003cdiv class=\"grid grid-cols-1 md:grid-cols-2 gap-8\"\u003e\n    {projects.map((project) =\u003e \u003cProjectCard project={project} /\u003e)}\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Overrides\n\nYou might want to add, or modify data for a project. To keep this easy to maintain, and to allow\nmarkdown parsing, you can create a `my_project.md` file inside your `overridesDir`.\n\nThe default directory is `src/content/project-overrides`.\n\nJust create an md file with all the related fields you want to override. Insert the readme Markdown\ncontent under the properties.\n\nThese fields are editable:\n\n- `title`\n- `description`\n- `order`\n- `featured`\n\nExample file: `src/content/project-overrides/my_project.md`\n\n```md\n---\ntitle: My Project # instead of my_project\nfeatured: true\n---\n\nThis is the README content for my project. Hooray!\n```\n\n## Contributing\n\nI am developing this package on my free time, so any support, whether code, issues, or just stars is\nvery helpful to sustaining its life. If you are feeling incredibly generous and would like to donate\njust a small amount to help sustain this project, I would be very very thankful!\n\n\u003ca href='https://ko-fi.com/casraf' target='_blank'\u003e\n  \u003cimg height='36' style='border:0px;height:36px;'\n    src='https://cdn.ko-fi.com/cdn/kofi1.png?v=3'\n    alt='Buy Me a Coffee at ko-fi.com' /\u003e\n\u003c/a\u003e\n\nI welcome any issues or pull requests on GitHub. If you find a bug, or would like a new feature,\ndon't hesitate to open an appropriate issue and I will do my best to reply promptly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenasraf%2Fgithub-repos-astro-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchenasraf%2Fgithub-repos-astro-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchenasraf%2Fgithub-repos-astro-loader/lists"}