{"id":19439026,"url":"https://github.com/fakelog/svelte-tailwind-github-pages-example","last_synced_at":"2026-04-16T10:03:23.586Z","repository":{"id":165545468,"uuid":"630473211","full_name":"fakelog/svelte-tailwind-github-pages-example","owner":"fakelog","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-20T13:29:22.000Z","size":71,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-24T21:31:42.869Z","etag":null,"topics":["example","github-pages","svelte","tailwindcss"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/fakelog.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,"publiccode":null,"codemeta":null}},"created_at":"2023-04-20T13:07:06.000Z","updated_at":"2023-04-20T13:33:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"8b96ae23-66bb-40ea-9ef5-7c9cd1a49203","html_url":"https://github.com/fakelog/svelte-tailwind-github-pages-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fakelog/svelte-tailwind-github-pages-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakelog%2Fsvelte-tailwind-github-pages-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakelog%2Fsvelte-tailwind-github-pages-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakelog%2Fsvelte-tailwind-github-pages-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakelog%2Fsvelte-tailwind-github-pages-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fakelog","download_url":"https://codeload.github.com/fakelog/svelte-tailwind-github-pages-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fakelog%2Fsvelte-tailwind-github-pages-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31880884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["example","github-pages","svelte","tailwindcss"],"created_at":"2024-11-10T15:20:49.295Z","updated_at":"2026-04-16T10:03:23.568Z","avatar_url":"https://github.com/fakelog.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating a Svelte app with Tailwind CSS and deploying to GitHub Pages\n\n## **Creating the project**\n\n### To create a new Svelte app with Tailwind CSS and GitHub Pages deployment, follow these steps:\n\n1. Create a new project directory and navigate to it:\n```bash\nnpm create svelte@latest svelte-tailwind-github-pages-example\ncd svelte-tailwind-github-pages-example\nnpm i\n```\n\n2. Install the Svelte static adapter:\n```bash\nnpm i -D @sveltejs/adapter-static@latest\n```\n\n3. Configure the adapter in svelte.config.js:\n```js | ddd\nimport adapter from '@sveltejs/adapter-static';\n\n/** @type {import('@sveltejs/kit').Config} */\nconst config = {\n\tkit: {\n\t\tadapter: adapter({\n\t\t\tpages: 'build',\n\t\t\tassets: 'build',\n\t\t\tfallback: null,\n\t\t\tprecompress: false,\n\t\t\tstrict: true\n\t\t})\n\t}\n};\n\nexport default config;\n```\n\n4. Enable prerendering in the layout component by adding `prerender: true` to `src/routes/+layout.js`.\n```js\nexport const prerender = true;\n```\n\n\u003e More information on the [website](https://kit.svelte.dev/docs/adapter-static)\n\n## **Installing and configuring Tailwind CSS**\n\n### To install and configure Tailwind CSS in your Svelte app, follow the steps on the website\n\n\u003e To install and configure Tailwind CSS in your Svelte app, follow the steps on the [website](https://tailwindcss.com/docs/guides/sveltekit)\n\n## **Configuring for deployment on GitHub Pages**\n\n1. Install the `gh-pages` package:\n```bash\nnpm install gh-pages --save-dev\n```\n\n2. Add the following scripts to your `package.json` file:\n```json\n\t...\n\t\"scripts\": {\n\t\t...\n\t\t\"preview\": \"vite preview\",\n\t\t\"deploy\": \"npm run build \u0026\u0026 node ./gh-pages.js\"\n\t},\n\t...\n```\n\n3. Create a new `gh-pages.js` file and add the following code:\n```js\nimport ghpages from 'gh-pages';\n\nghpages.publish('build', {\n    branch: 'gh-pages',\n    repo: 'https://github.com/fakelog/svelte-tailwind-github-pages-example.git',  // Replace with your GitHub repository URL\n    user: {\n        name: 'fakelog', // Replace with your GitHub username\n        email: 'solodyankin.d@outlook.com' // Replace with your email address\n    },\n    dotfiles: true\n}, () =\u003e {\n    console.log('deployment done');\n}\n);\n```\n\n\u003e More information on the [website](https://github.com/tschaub/gh-pages-static)\n\n## Developing\n\n### Start a development server:\n\n```bash\nnpm run dev\n\n# or start the server and open the app in a new browser tab\nnpm run dev -- --open\n```\n\n## Building and deploying \n\n### Create a production version of your app:\n\n```bash\nnpm run build\n```\n\n### Build and deploying:\n\n```bash\nnpm run deploy\n```\n\n\u003e More information on the [website](https://github.com/sveltejs/svelte/blob/master/README.md)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakelog%2Fsvelte-tailwind-github-pages-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffakelog%2Fsvelte-tailwind-github-pages-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffakelog%2Fsvelte-tailwind-github-pages-example/lists"}