{"id":13417111,"url":"https://github.com/svelte-pilot/svelte-pilot-template","last_synced_at":"2025-12-24T02:04:43.949Z","repository":{"id":39290840,"uuid":"333091592","full_name":"svelte-pilot/svelte-pilot-template","owner":"svelte-pilot","description":"Svelte template with SSR","archived":false,"fork":false,"pushed_at":"2025-03-20T01:47:07.000Z","size":163,"stargazers_count":60,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-22T20:04:52.250Z","etag":null,"topics":["ssr","svelte"],"latest_commit_sha":null,"homepage":"https://svelte-pilot.github.io/","language":"TypeScript","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/svelte-pilot.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,"dei":null}},"created_at":"2021-01-26T13:21:12.000Z","updated_at":"2025-10-10T17:33:54.000Z","dependencies_parsed_at":"2024-01-07T18:03:59.411Z","dependency_job_id":"afeec104-8420-49ce-9763-54bf09ef3ab0","html_url":"https://github.com/svelte-pilot/svelte-pilot-template","commit_stats":null,"previous_names":["jiangfengming/svelte-pilot-template","svelte-pilot/svelte-pilot-template","jiangfengming/svelte-vite-ssr"],"tags_count":3,"template":true,"template_full_name":null,"purl":"pkg:github/svelte-pilot/svelte-pilot-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelte-pilot%2Fsvelte-pilot-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelte-pilot%2Fsvelte-pilot-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelte-pilot%2Fsvelte-pilot-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelte-pilot%2Fsvelte-pilot-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svelte-pilot","download_url":"https://codeload.github.com/svelte-pilot/svelte-pilot-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svelte-pilot%2Fsvelte-pilot-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27992996,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ssr","svelte"],"created_at":"2024-07-30T22:00:32.627Z","updated_at":"2025-12-24T02:04:43.942Z","avatar_url":"https://github.com/svelte-pilot.png","language":"TypeScript","funding_links":[],"categories":["Get Started"],"sub_categories":["Templates"],"readme":"# Svelte Pilot Template\n\nA template based on the [Svelte Pilot](https://github.com/svelte-pilot/svelte-pilot) routing library, offering server-side rendering (SSR) and other rich features.\n\n## Core Features\n\n- **Multiple Deployment Modes**: Supports SSR (Server-Side Rendering), SSG (Static Site Generation), SPA (Single Page Application), and serverless functions.\n- **Powerful Routing and Layout System**: Supported by [Svelte Pilot](https://github.com/svelte-pilot/svelte-pilot).\n- **Integrated with TypeScript**: For type safety and robust coding.\n- **Integrated with PostCSS and UnoCSS**: Ready to use without configuration.\n- **Convenient Image Import**: With [svelte-preprocess-import-assets](https://github.com/bluwy/svelte-preprocess-import-assets), you can directly import images using the `\u003cimg src=\"./img.png\"\u003e` tag without manually writing an `import`.\n- **Enhanced CSS Isolation**: Through [svelte-preprocess-css-hash](https://github.com/jiangfengming/svelte-preprocess-css-hash), `\u003cChild class=\"-child\"\u003e` becomes `\u003cChild class=\"-child-HaShEd\"\u003e`.\n\n## Quick Preview\n\nExperience the editable demo on the [StackBlitz Online IDE](https://stackblitz.com/~/github.com/svelte-pilot/svelte-pilot-template?startScript=dev:ssr).\n\n## Create a Project\n\n```sh\nnpm create svelte-pilot my-svelte-app\ncd my-svelte-app\nnpm i\n```\n\nOr:\n\n```sh\nmkdir my-svelte-app\ncd my-svelte-app\nnpm init svelte-pilot\nnpm i\n```\n\n## Development\n\n```sh\nnpm run dev:spa            # Develop in SPA mode\nnpm run dev:ssr            # Develop in SSR mode\nPORT=8080 npm run dev:ssr  # Specify the port.\n```\n\n## Build\n\n```sh\nnpm run build:spa                 # Build SPA site\nnpm run build:ssr                 # node.js SSR server\nnpm run build:ssg                 # Generate static site. (Configure URLs in ssg.json)\nNOJS=1 npm run build:ssg          # Generate static site without JS\nnpm run build:cloudflare-workers  # Cloudflare Workers\nnpm run build:cloudflare-pages    # Cloudflare Pages\n\n# Netlify Functions\ncp src/adapters/netlify/netlify.toml .\nnpm run build:netlify\n\n# Netlify Edge Functions\ncp src/adapters/netlify-edge/netlify.toml .\nnpm run build:netlify-edge\n```\n\n## Run\n\n```sh\nnpx sirv-cli dist --single --host # SPA\nnpx sirv-cli dist --host          # SSG\nnpm run start:ssr                 # node.js SSR server.\nPORT=8080 npm run start:ssr       # Specify the port.\n```\n\n## Deploy to the Cloud\n\n### Cloudflare\n\n#### Workers\n\n##### Deploy using `wrangler` CLI:\n\n```sh\nwrangler deploy\n```\n\n##### Deploy using Git\n\n1. Link your Git repository to Cloudflare Workers.\n2. Set up the build configuration:\n   - Build command: `npm run build:cloudflare-workers`\n   - Deploy command: `npx wrangler deploy`\n\n#### Pages\n\n##### Deploy using `wrangler` CLI:\n\n```sh\nwrangler pages deploy dist\n```\n\n##### Deploy using Git\n\n1. Link your Git repository to Cloudflare Pages.\n2. Set up the build configuration:\n   - Build command: `npm run build:cloudflare-pages`\n   - Build output directory: `dist`\n\n### Netlify\n\nDeploy using the `netlify deploy` CLI, or link your Git repository to Netlify.\n\n## FAQ\n\n### Can't run on Windows\n\n```sh\nnpm config set script-shell \"C:\\\\Program Files\\\\git\\\\bin\\\\bash.exe\"\n```\n\n[How to set shell for npm run-scripts in Windows](https://stackoverflow.com/questions/23243353/how-to-set-shell-for-npm-run-scripts-in-windows)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvelte-pilot%2Fsvelte-pilot-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvelte-pilot%2Fsvelte-pilot-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvelte-pilot%2Fsvelte-pilot-template/lists"}