{"id":20931607,"url":"https://github.com/johnwargo/github-repos-sample-unauthorized","last_synced_at":"2025-03-13T02:16:48.463Z","repository":{"id":213786634,"uuid":"734498072","full_name":"johnwargo/github-repos-sample-unauthorized","owner":"johnwargo","description":"Demonstrates how to list GitHub repositories on an Eleventy site (unauthorized)","archived":false,"fork":false,"pushed_at":"2023-12-22T15:22:02.000Z","size":355,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-19T19:09:56.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnwargo.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-21T20:53:37.000Z","updated_at":"2024-01-02T16:53:51.000Z","dependencies_parsed_at":"2023-12-23T04:24:48.470Z","dependency_job_id":"0c7c45d5-c1d7-478c-85b7-84be8906b69a","html_url":"https://github.com/johnwargo/github-repos-sample-unauthorized","commit_stats":null,"previous_names":["johnwargo/github-repos-sample-unauthorized"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fgithub-repos-sample-unauthorized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fgithub-repos-sample-unauthorized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fgithub-repos-sample-unauthorized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwargo%2Fgithub-repos-sample-unauthorized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnwargo","download_url":"https://codeload.github.com/johnwargo/github-repos-sample-unauthorized/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243324505,"owners_count":20273113,"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":[],"created_at":"2024-11-18T21:44:26.994Z","updated_at":"2025-03-13T02:16:48.437Z","avatar_url":"https://github.com/johnwargo.png","language":"CSS","funding_links":["https://www.buymeacoffee.com/johnwargo"],"categories":[],"sub_categories":[],"readme":"# Eleventy Display GitHub Repositories (no auth)\n\nPlaying around with displaying all public repositories in my personal GitHub account in an Eleventy site.\n\n**Note:** The approach used in this repository uses unauthenticated access to the GitHub APIs; since GitHub limits API calls for unauthenticated access, your site builds will fail after 60 API calls in an hour. Yes, I likely will create a version of this that uses authentication.\n\n## Demonstration\n\nThis repository includes a complete Eleventy site demonstrating the capability. To try it out, start by cloning the repository then navigate to the project's `/src/_data` folder and edit the `repos.js` file (`/src/_data/repos.js`).  In the file, look for the `githubAccount` constant declaration:\n\n```js\nconst githubAccount = 'johnwargo';\n```\n\nChange the value in quotes to your GitHub account name then save your changes:\n\n```js\nconst githubAccount = 'your-github-account-name';\n```\n\nNext, open a terminal window or command prompt, navigate to the cloned project folder, and execute the following commands:\n\n1. `npm install`\n2. `eleventy --serve`\n\nOutput looks something like this:\n\n```text\nD:\\dev\\11ty\\github-repos-sample-unauthorized\u003enpm start\n\n\u003e github-test@1.0.0 start\n\u003e eleventy --serve\n\nFetching GitHub repositories for johnwargo\nFetching https://api.github.com/users/johnwargo/repos?per_page=100\u0026page=1\nFound 100 repos\nFetching https://api.github.com/users/johnwargo/repos?per_page=100\u0026page=2\nFound 9 repos\nFetching https://api.github.com/users/johnwargo/repos?per_page=100\u0026page=3\n[11ty] Writing _site/index.html from ./src/index.liquid\n[11ty] Benchmark   1535ms  97%     1× (Data) `./src/_data/repos.js`\n[11ty] Copied 3 files / Wrote 1 file in 1.57 seconds (v3.0.0-alpha.3)\n[11ty] Watching…\n[11ty] Server at http://localhost:8080/\n```\n\nClick the **Server** link that displays at the end of the build process and you should see something like this:\n\n![Sample Page](images/image-01.png)\n\n**Note:** Sample Page rendered using [MVP.css](https://andybrewer.github.io/mvp/).\n\n## Usage\n\nTo add this capability to an Eleventy site, simply copy the modified `repos.js` file to the Eleventy project's `_data` folder. With that in place, the Eleventy site has access to a `repos` data collection you can use to render data on any page in your site.\n\nThe data collection has a lot of properties, open this URL in a browser to see them all: https://api.github.com/users/johnwargo/repos.\n\n***\n\nYou can find information on many different topics on my [personal blog](http://www.johnwargo.com). Learn about all of my publications at [John Wargo Books](http://www.johnwargobooks.com).\n\nIf you find this code useful and feel like thanking me for providing it, please consider \u003ca href=\"https://www.buymeacoffee.com/johnwargo\" target=\"_blank\"\u003eBuying Me a Coffee\u003c/a\u003e, or making a purchase from [my Amazon Wish List](https://amzn.com/w/1WI6AAUKPT5P9).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwargo%2Fgithub-repos-sample-unauthorized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnwargo%2Fgithub-repos-sample-unauthorized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwargo%2Fgithub-repos-sample-unauthorized/lists"}