{"id":24064754,"url":"https://github.com/jsolly/static-astro-website","last_synced_at":"2025-02-26T18:15:05.605Z","repository":{"id":270577696,"uuid":"910805927","full_name":"jsolly/static-astro-website","owner":"jsolly","description":"Template repo for quickly deploying @astrodotbuild static websites with Biome formatting and linting, pre-configured pre-commit hooks via Husky and lint-staged, and Astro extensions for Tailwind and Sitemap integration.","archived":false,"fork":false,"pushed_at":"2025-02-19T22:41:05.000Z","size":777,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T21:43:21.172Z","etag":null,"topics":["astrojs","precommit-hooks","static-site","tailwind"],"latest_commit_sha":null,"homepage":"","language":"Astro","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsolly.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2025-01-01T13:41:21.000Z","updated_at":"2025-02-21T00:26:41.000Z","dependencies_parsed_at":"2025-01-01T14:39:31.602Z","dependency_job_id":null,"html_url":"https://github.com/jsolly/static-astro-website","commit_stats":null,"previous_names":["jsolly/static-astro-website"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsolly%2Fstatic-astro-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsolly%2Fstatic-astro-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsolly%2Fstatic-astro-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsolly%2Fstatic-astro-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsolly","download_url":"https://codeload.github.com/jsolly/static-astro-website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240907852,"owners_count":19876691,"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":["astrojs","precommit-hooks","static-site","tailwind"],"created_at":"2025-01-09T10:40:33.486Z","updated_at":"2025-02-26T18:15:05.583Z","avatar_url":"https://github.com/jsolly.png","language":"Astro","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 🚀 Project Structure\n\nInside of your Astro project, you'll see the following folders and files:\n\n```text\n/\n├── public/\n│   └── favicon.svg\n├── src/\n│   ├── layouts/\n│   │   └── Layout.astro\n│   └── pages/\n│       └── index.astro\n└── package.json\n```\n\nTo learn more about the folder structure of an Astro project, refer to [Astro's guide on project structure](https://docs.astro.build/en/basics/project-structure/).\n\n## 🧞 Commands\n\nAll commands are run from the root of the project, from a terminal:\n\n| Command                   | Action                                           |\n| :------------------------ | :----------------------------------------------- |\n| `pnpm install`            | Installs dependencies                            |\n| `pnpm dev`                | Starts local dev server at `localhost:4321`      |\n| `pnpm build`              | Build your production site to `./dist/`          |\n| `pnpm preview`            | Preview your build locally, before deploying     |\n| `pnpm astro ...`          | Run CLI commands like `astro add`, `astro check` |\n| `pnpm lint`               | Run Biome linter                                 |\n| `pnpm lint-fix`           | Run Biome linter and fix issues                  |\n| `pnpm format`             | Format files using Biome                         |\n| `pnpm check`              | Run Biome checks with auto-fixes                 |\n\n##    Additional Packages/Tools added (These commands have already been run)\n\n```shell\npnpm astro add tailwind sitemap\npnpm add --save-dev --save-exact @biomejs/biome\npnpm biome init\npnpm add --save-dev lint-staged husky\npnpm exec husky init\n```\n\n## Biome Configuration Notes\n\nThe project includes specific linting overrides for `.svelte`, `.astro`, and `.vue` files in `biome.json`. These overrides (disabling `useConst` and `useImportType` rules) are necessary due to limited Astro support as of January 1, 2025. See [Biome language support](https://biomejs.dev/internals/language-support/#html-super-languages-support) for more information.\n\n## Husky Configuration Notes\n\nA pre-commit hook has been configured in `.husky/pre-commit` that runs lint-staged before each commit. The script:\n- Runs lint-staged to format and lint staged files using Biome\n- Fails the commit if lint-staged reports any errors\n\n```shell\necho \"🚀 Running pre-commit hook...\"\necho \"Files to be processed:\"\ngit diff --cached --name-only\necho \"---\"\npnpm lint-staged\nlint_status=$?\n\nif [ $lint_status -ne 0 ]; then\n  echo \"❌ Lint-staged failed! Please fix the errors and try committing again.\"\n  exit $lint_status\nfi\n\necho \"✅ Pre-commit hook completed successfully\"\n```\n\nThis ensures that all committed code meets the project's formatting and linting standards, with clear visual feedback during the commit process.\n\n## Lint-staged Configuration Notes\n\nLint-staged is configured in `package.json` to run `biome check` on all staged files. The configuration uses the `--no-errors-on-unmatched` flag to prevent errors when processing unsupported file types, and `--write` to allow automatic fixes where possible.\n\n```json\n\"lint-staged\": {\n    \"*\": [\"biome check --no-errors-on-unmatched --write\"]\n}\n```\n\nThis ensures that all staged files are checked and formatted before each commit, with Biome gracefully handling files it doesn't support. The check command combines both formatting and linting in a single pass.\n\n\n## Additional Resources\n\n[Astro documentation](https://docs.astro.build)\n\n[Biome documentation](https://biomejs.dev/guides/getting-started/)\n\n[Discord server](https://astro.build/chat)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsolly%2Fstatic-astro-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsolly%2Fstatic-astro-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsolly%2Fstatic-astro-website/lists"}